S
sunjunfeng3
Unregistered / Unconfirmed
GUEST, unregistred user!
总是出现Variable required <br>function TForm1.EnumProc(Handle: THandle; Param: Integer): Boolean; stdcall;<br>begin<br> MESSAGEBOX(0,pchar(inttostr(Handle)),'句柄',0);<br>end;<br><br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> Buffer: array[0..1] of Cardinal;<br>begin<br> Buffer[0] := GetCurrentThreadId;<br> Buffer[1] := 0;<br> EnumThreadWindows(GetCurrentThreadID, @EnumProc, Integer(Buffer));//这里出错<br> //Edit1.Text:=inttostr(GetHWNDofProcess(GetCurrentThreadID));<br>end;<br><br>总是出现Variable required