CoderSource.net
Search
Re: Application Path
Started by agenore at 04-06-2006 3:11 AM. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
   04-06-2006, 3:11 AM
agenore is not online. Last active: 7/24/2006 9:38:58 AM agenore



Top 10 Posts
Joined on 03-21-2006
Parma
Posts 26
Surprise [:O] Application Path
Hi,
How Can I know the application working directory?
   Report 
   04-06-2006, 5:05 AM
Skizmo is not online. Last active: 11/9/2006 11:09:26 AM Skizmo



Top 10 Posts
Joined on 01-19-2006
Holland
Posts 5
Geeked [8-|] Re: Application Path
the working directory or the directory where your current app. is located ??

working dir :
GetCurrentDirectory (...) after startup.

app dir:
CString clPath;

clPath = AfxGetApp ()->m_pszHelpFilePath;
clPath = clPath.Left (clPath.ReverseFind ('\\') + 1);

   Report 
   04-06-2006, 8:14 PM
Yasir is not online. Last active: 11/16/2006 10:02:40 AM Yasir

Top 10 Posts
Joined on 03-15-2006
Posts 44
Re: Application Path
You can use GetModuleFileName() for that, passing NULL as the hModule parameter. That gives you the EXE's full path name, and you can extract the path.
   Report 
   04-07-2006, 5:05 AM
agenore is not online. Last active: 7/24/2006 9:38:58 AM agenore



Top 10 Posts
Joined on 03-21-2006
Parma
Posts 26
Re: Application Path
Thanks at all. I'll try.

   Report 
Codersource.Net » Programming » MFC Programming » Re: Application Path

MENU
Home
MFC 
C++
.Net
WIN32
Programming
Forum
My Articles
Welcome to Codersource.Net Login | Register | Faq  

Google
 

NOTES:


Thanks for visiting our CoderSource.net. This site will be improved with more articles. Interested visitors can also submit their articles through the Submit Article link.Your article will also be published after due consideration by the editor. 

© Copyright 2003. All rights on content reserved by CoderSource.net. Contact    About Us