How to identify the process with the handle of the window?

How to identify the process with the handle of the window?

Postby Anderson.OL » Thu Oct 02, 2008 1:02 pm

How to identify the process with the handle of the window?

Topic base
FiveWin 9.03 + xHarbour !!
User avatar
Anderson.OL
 
Posts: 92
Joined: Thu Feb 15, 2007 11:37 am
Location: Itaocara - RJ - Brasil

Postby Antonio Linares » Thu Oct 02, 2008 1:23 pm

Anderson,

GetWindowThreadProcessId()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Anderson.OL » Thu Oct 02, 2008 1:40 pm

but and the name?
FiveWin 9.03 + xHarbour !!
User avatar
Anderson.OL
 
Posts: 92
Joined: Thu Feb 15, 2007 11:37 am
Location: Itaocara - RJ - Brasil

Postby Antonio Linares » Thu Oct 02, 2008 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 81 guests