1,183
社区成员
发帖
与我相关
我的任务
分享
type
aVcStruct = record
char1 : PChar;
char2 : PChar;
int1 : Integer;
char3 : PChar;
end;
var
strc,strc1 : aVcStruct;
a1,a2,a3 : array[0..1023] of Char;
begin
//写法1
strc.char1 := @a1;
strc.char2 := @a2;
strc.char3 := @a3;
strc.int1 := 1;
DllFunc(aVcStruct);
//写法2
GetMem(strc1.char1,1024);
GetMem(strc1.char2,1024);
GetMem(strc1.char3,1024);
strc1.int1 := 1;
DllFunc(aVcStruct1);
FreeMem(strc1.char1);
FreeMem(strc1.char2);
FreeMem(strc1.char3);
end;