|
-
May 7th, 1999, 05:52 AM
#1
Howto: from HWND to EXE ???
If I know an windows handle, how can I find out the exe name and path (and the Process ID)of the application owning it?
-
May 7th, 1999, 08:22 AM
#2
Re: Howto: from HWND to EXE ???
GetWindowThreadProcessId()
Can get the Process ID. Don't know how to leap from there to the exe name and path though unfortunately.
Roger
-
May 10th, 1999, 05:11 AM
#3
Re: Howto: from HWND to EXE ???
GetWindowModuleFileName()
-
May 11th, 1999, 12:27 AM
#4
Re: Howto: from HWND to EXE ???
You should call next functions:
1. Get WindowThreadProcessId(...) to get Process ID from HWND;
2. OpenProcess(...) or GetProcessInformation(...) to get HANDLE to the process;
3. EnumProcessModules(...) to get HANDLEs to all modules of the process;
4. GetModuleFileName(...) to get path to module's file.
Actually, I had the reverse problem. And I solved it.
I think this should work.
Thanks,
Ilgar Mashayev
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|