如何在Delphi 7中调用GetProcessHandleFromHwnd?
显然它是XP引入的Windows API函数。
http://msdn.microsoft.com/en-us/library/windows/desktop/dd318087(v=vs.85).aspx
答案 0 :(得分:0)
不可能直接调用该函数。但您可以参考:
// reference to the Windows function:
function GetProcessHandleFromHwnd(hwnd: HWND): THandle; external 'oleacc.dll' name 'GetProcessHandleFromHwnd'; stdcall;
// and you can call it from your own function:
function TryGetProcessHandle(const WindowHandle: THandle; var ProcessHandle: THandle): Boolean;
begin
ProcessHandle := GetProcessHandleFromHwnd(WindowHandle);
Result := (ProcessHandle <> 0);
end;