|
-
May 8th, 1999, 08:00 AM
#1
Get the AppPath
How can I get the full path name of my application at runtime???
-
May 8th, 1999, 11:48 AM
#2
Re: Get the AppPath
See GetModuleFileName() in the docs.
-
May 8th, 1999, 12:04 PM
#3
Re: Get the AppPath
You can also use GetCommandLine() to get the full path for your app.
-
September 11th, 1999, 07:19 AM
#4
Re: Get the AppPath
Hi.
I use this procedure:
UINT GetBaseDirectory(LPTSTR lpBuffer, UINT uSize)
{
if(lpBuffer==NULL) {ASSERT(0); return 0;}
DWORD resLen = GetModuleFileName(NULL, lpBuffer, uSize);
if(resLen==0) {ASSERT(0); return 0;}
//exclude file name
do
resLen--;
while(lpBuffer[resLen-1]!='\\');
lpBuffer[resLen] = 0;
return resLen;
}
Best wishes.
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
|