| View previous topic :: View next topic |
| Author |
Message |
Trow Grandmaster Cheater
Reputation: 2
Joined: 17 Aug 2006 Posts: 957
|
Posted: Wed Sep 26, 2007 12:23 am Post subject: Get Process Full Path |
|
|
I am EnumWindows-ing through the visible windows (IsWindowVisible) on the desktop and see if any of them came from an exe (e.g. say, C:\test.exe).
So now I have hwnd of every window visible on the screen, which I can get the process ID using GetWindowThreadProcessId. Now I have all the visible running process IDs.
But how would I know what the full path of those processes are?
_________________
Get kidnapped often. |
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Wed Sep 26, 2007 12:30 am Post subject: |
|
|
| GetModuleFileNameEx
|
|
| Back to top |
|
 |
Trow Grandmaster Cheater
Reputation: 2
Joined: 17 Aug 2006 Posts: 957
|
Posted: Wed Sep 26, 2007 1:12 am Post subject: |
|
|
looks like in an article about this I need to get the module name (i assume this is "test.exe" in "C:\test.exe") with GetModuleBaseName; o well, will read the code for the next 2 hours
_________________
Get kidnapped often. |
|
| Back to top |
|
 |
compactwater I post too much
Reputation: 8
Joined: 02 Aug 2006 Posts: 3923
|
Posted: Wed Sep 26, 2007 1:14 am Post subject: |
|
|
uses psapi;
For Delphi users.
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Wed Sep 26, 2007 1:46 am Post subject: |
|
|
| compactwater wrote: | uses psapi;
For Delphi users.  |
#include "psapi.h"
For Good programmers.
|
|
| Back to top |
|
 |
Trow Grandmaster Cheater
Reputation: 2
Joined: 17 Aug 2006 Posts: 957
|
Posted: Wed Sep 26, 2007 2:25 am Post subject: |
|
|
post number ?34567 for good posts - thanks everyone, I got it!
_________________
Get kidnapped often. |
|
| Back to top |
|
 |
|