FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to identify the process with the handle of the window?
Posts: 92
Joined: Thu Feb 15, 2007 11:37 AM
How to identify the process with the handle of the window?
Posted: Thu Oct 02, 2008 01:02 PM
How to identify the process with the handle of the window?

Topic base
FiveWin 9.03 + xHarbour !!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to identify the process with the handle of the window?
Posted: Thu Oct 02, 2008 01:23 PM

Anderson,

GetWindowThreadProcessId()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 92
Joined: Thu Feb 15, 2007 11:37 AM
How to identify the process with the handle of the window?
Posted: Thu Oct 02, 2008 01:40 PM

but and the name?

FiveWin 9.03 + xHarbour !!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to identify the process with the handle of the window?
Posted: Thu Oct 02, 2008 04:14 PM

Anderson,

DWORD GetWindowThreadProcessId(
HWND hWnd, // handle of window
LPDWORD lpdwProcessId // address of variable for process identifier
);

lpdwProcessId Points to a 32-bit value that receives the process identifier

Then you can use GetModuleFileName() with that ProcessId.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion