All Forums
 Microsoft Windows CE
 eVC Application Development
 Current Application Directory
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

dhonda

2 Posts

Posted - 19 Mar 2002 :  14:54:46  Show Profile  Email Poster
What function call do you use to get the application's directory?

I am using fopen() to open a configuration file. When I specify just the file name (e.g. "config.txt") it can't find the file even though it is in the same directory as the application. It works when I specify the full path of the file, but I've had to hard code the path name because Windows CE does not support the GetCurrentDirectory() function. Is there a way of programatically getting the application's directory path?

ctacke

877 Posts

Posted - 19 Mar 2002 :  15:27:15  Show Profile  Email Poster
Windows CE doesn't really have the concept of a current directory, so there isn't a direct call to get the directory.

You can, however, get the full path of the currently running executable using GetModuleFileName(). This will include the path, you just need to trim off the executable name.


-----------------
Chris Tacke, eMVP
Applied Data Support
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000