|
-
March 7th, 2003, 09:55 PM
#1
How to get path of an executable file?
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!
-
March 7th, 2003, 10:54 PM
#2
Hope it helps
http://www.codeguru.com/forum/showth...plication+path
The answer is using Win32 API, despite the thread title.
-
March 8th, 2003, 01:45 AM
#3
Take a look at this FAQ...
-
March 15th, 2003, 06:12 PM
#4
Simple
char szPath[512]="";
GetModuleFileName(GetModuleHandle(NULL),szPath,sizeof(szPath));
replace GetModuleHandle(NULL) - with the one of the running file
-
March 15th, 2003, 06:39 PM
#5
Heh, I was just about to post exactly the same question - talk about coincidences...
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
|