How can I find the name of a process%2
Printable View
How can I find the name of a process%2
If you mean the file name then:
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
could you tell me the reverse problem's solution
How can i find the processid from the process name
1. EnumProcess(...) to get process ID's array
2. OpenProcess(...) to get process handle
3. EnumModules(...) to get process' module handles
First handle is the handle to executable
4. GetModuleFileNameEx(...) to get it's path
5. Compare it with your process name
Search in the MSDN KB.(Enumerating Win32 Applications).
If you need the source mail me.
Thanks,
Ilgar Mashayev