F
flyerer1
Unregistered / Unconfirmed
GUEST, unregistred user!
我在网上搜了个串口通讯的简单的code.运行时提示ointer type required,代码如下:
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
viewstring:string;
sbuf:array[0..16] of byte;
rbuf:array[0..16] of char;
begin
viewstring:='';
move(buffer^,pchar(@rbuf^),bufferlength); // 出错的地方
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
viewstring:string;
sbuf:array[0..16] of byte;
rbuf:array[0..16] of char;
begin
viewstring:='';
move(buffer^,pchar(@rbuf^),bufferlength); // 出错的地方