Z
ZRWeng
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
S:string;
begin
s:='';
Move(buffer^,pchar(s)^,bufferLength);//<----执行完这句后出错 Why????
Showstr:='接收字符:'+ s;
memo1.lines.add(Showstr);
memo1.lines.add('-------------------------------');
Memo1.Invalidate;
Statusbar1.SimpleText:='数据接收完毕!';
end;
//错误信息:Project Demo.exe Raised Exception Class EAccessViolation With Message
// 'Access violation at address 0040293B in module 'demo.exe'.Write of address...
使用控件SPComm
BufferLength: Word);
var
S:string;
begin
s:='';
Move(buffer^,pchar(s)^,bufferLength);//<----执行完这句后出错 Why????
Showstr:='接收字符:'+ s;
memo1.lines.add(Showstr);
memo1.lines.add('-------------------------------');
Memo1.Invalidate;
Statusbar1.SimpleText:='数据接收完毕!';
end;
//错误信息:Project Demo.exe Raised Exception Class EAccessViolation With Message
// 'Access violation at address 0040293B in module 'demo.exe'.Write of address...
使用控件SPComm