D
doll_paul
Unregistered / Unconfirmed
GUEST, unregistred user!
如何在线程单元!注意,是在线程单元中!!!
例如:
function EnumWndProc(AhWnd: HWnd; AlParam: pointer): Boolean; stdcall;
begin
integer(alparam^) := 1000;
end;
procedure wwww.Execute;
begin
FreeOnTerminate := True;
temp := 1;
EnumWindows(@EnumWndProc, Longint(@temp));
//我要temp变为1000
end;
以上代码有时候会成功,有时候则会出错。另外,小弟按以上思路把TEMP从整型换为记录类
后,会出错地址错,那位老兄可以给出记录类的DEMO,谢谢!!!!
例如:
function EnumWndProc(AhWnd: HWnd; AlParam: pointer): Boolean; stdcall;
begin
integer(alparam^) := 1000;
end;
procedure wwww.Execute;
begin
FreeOnTerminate := True;
temp := 1;
EnumWindows(@EnumWndProc, Longint(@temp));
//我要temp变为1000
end;
以上代码有时候会成功,有时候则会出错。另外,小弟按以上思路把TEMP从整型换为记录类
后,会出错地址错,那位老兄可以给出记录类的DEMO,谢谢!!!!