A
asaili
Unregistered / Unconfirmed
GUEST, unregistred user!
我是用在串口通讯时,接受缓冲区数据时发生的:
procedure TForm1.MSComm1Comm(Sender: TObject);
var
buffout:OleVariant;
buffin:OleVariant;
begin
buffout:=VarArrayCreate([0,5],varbyte);
buffin:=VarArrayCreate([0,5],varbyte);
case MSComm1.CommEvent of
comEvSend : exit;
comEvReceive:
begin
if isdatas=false then
begin
buffout:=MSComm1.Input;
group:=buffout[0]; -----发生在这里!!
procedure TForm1.MSComm1Comm(Sender: TObject);
var
buffout:OleVariant;
buffin:OleVariant;
begin
buffout:=VarArrayCreate([0,5],varbyte);
buffin:=VarArrayCreate([0,5],varbyte);
case MSComm1.CommEvent of
comEvSend : exit;
comEvReceive:
begin
if isdatas=false then
begin
buffout:=MSComm1.Input;
group:=buffout[0]; -----发生在这里!!