L
litterbug
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
i:integer;
begin
viewstring:='';
move(buffer^,pchar(@rbuf^),bufferlength);
for i:=1 to bufferlength do
viewstring:=viewstring+inttohex(rbuf,2)+' ';
viewstring:='接受'+viewstring;
memo1.lines.add(viewstring);
memo1.lines.add('');
end;
move(buffer^,pchar(@rbuf^),bufferlength);出错为什么?
需要指针类型?
BufferLength: Word);
var
i:integer;
begin
viewstring:='';
move(buffer^,pchar(@rbuf^),bufferlength);
for i:=1 to bufferlength do
viewstring:=viewstring+inttohex(rbuf,2)+' ';
viewstring:='接受'+viewstring;
memo1.lines.add(viewstring);
memo1.lines.add('');
end;
move(buffer^,pchar(@rbuf^),bufferlength);出错为什么?
需要指针类型?