高手停下看看:將Pointer 轉成 array of char 型 ( 积分: 50 )

H

hgptm

Unregistered / Unconfirmed
GUEST, unregistred user!
如何將Pointer 轉成 array of char 型?
代碼如下:

procedure TForm1.Receive(buffer: Pointer
len: Integer;
fromIP: String
fromPort: Word);
var str,ss :string;
tmpBuff: array[0..1023] of char;
begin
//如何將buffer 轉成tmpBuff ?
end;
 
如何將Pointer 轉成 array of char 型?
代碼如下:

procedure TForm1.Receive(buffer: Pointer
len: Integer;
fromIP: String
fromPort: Word);
var str,ss :string;
tmpBuff: array[0..1023] of char;
begin
//如何將buffer 轉成tmpBuff ?
end;
 
StrCopy(tmpBuff, buffer)
 
StrCopy(@tmpBuff[0], buffer);
 

Similar threads

I
回复
0
查看
928
import
I
I
回复
0
查看
653
import
I
I
回复
0
查看
619
import
I
I
回复
0
查看
670
import
I
顶部