GetWindowThreadProcessId
(1)
GetProcessImageFileName
(1)
GetModuleFileNameEx
(1)
NtQueryInformationProcess
(1)
GetModuleBaseName
(1)
ProcessHandle
(1)
ProcessID
(1)
HWND
(1)

How to get process name from HWND or processID or ProcessHandle

Asked By Arif Ali Saiyed
26-Jan-10 04:50 PM
Hi There,
I have HWND / process ID  / Process handle
how can I find the process name from it...

I did try GetProcessImageFileName but it is returning junk characters :
(
-Arif

There are several old methods,

Christian ASTOR replied to Arif Ali Saiyed
26-Jan-10 04:50 PM
There are several old methods, like
GetModuleFileNameEx(),
GetModuleBaseName(),
NtQueryInformationProcess() & PROCESS_BASIC_INFORMATION,
etc...

GetWindowThreadProcessId is probably what you need.Arif Ali Saiyed wrote:

Ivo Beltchev replied to Arif Ali Saiyed
26-Jan-10 11:09 PM
GetWindowThreadProcessId is probably what you need.
Post Question To EggHeadCafe