procedure TForm1.MsgcommProcess(Var Message:TMessage);
var
ClearB:Boolean;
sComs:Tcomstat;
cbNum,ReadNumber:Integer;
lpErrors :DWORD;
Read_Buffer:array[1..100]of char;
Begin
ClearB:=Clearcommerror(hcom,lpErrors,@sComs);
if ClearB Then
Begin
cbNum:= sComs.cbInQue;
ReadFile(hCom,Read_Buffer,cbNum,ReadNumber,lpol);
//处理接收数据
SetEvent(Post_Event); //同步事件置位
end;
end;
就是上面简单的一个过程,编译的时候在行“cbNum:= sComs.cbInQue;
”总是提示Illegal character in input file: ' ' ($A1A1)的错误,真是晕倒,这个哪里有错啊!!!