I used "CreateToolhelp32Snapshot()" and "Process32Next()" to get information of a process and store it in "PROCESSENTRY32".
Question:
How can I get full path of executable file? ("szExeFile" property just store name of executable file.)
Thank you!
Printable View
I used "CreateToolhelp32Snapshot()" and "Process32Next()" to get information of a process and store it in "PROCESSENTRY32".
Question:
How can I get full path of executable file? ("szExeFile" property just store name of executable file.)
Thank you!
Hope it helps
http://www.codeguru.com/forum/showth...plication+path
The answer is using Win32 API, despite the thread title.
Take a look at this FAQ...
char szPath[512]="";
GetModuleFileName(GetModuleHandle(NULL),szPath,sizeof(szPath));
replace GetModuleHandle(NULL) - with the one of the running file :)
Heh, I was just about to post exactly the same question - talk about coincidences...