Tarr = array of Byte;
pr = record
ta, tb: Tarr;
end;
PPr = ^pr;
var
h: THandle;
Procedure getf(p: PPr); stdcall;
begin
Form1.Button1.Caption := Format('Ta:%d+1,
Tb:%d+1', [High(P.ta), High(P.tb)]);
Dispose(P);
ExitThread(0);
end;
procedure Tform1.Button1Click(Sender: TObject);
var
pc: PPr;
tid: Cardinal;
begin
New(pc);
SetLength(PC.ta, 10);
SetLength(pc.tb, 12);
try
h := createThread(nil, 0, @getf, pc, 0, Tid);
finally
if h <> 0 then CloseHandle(h);
end;
end;
[
本帖最后由 haiou327 于 2014-6-23 21:35 编辑 ]