Get/SetCurrentDirectory  
Author Message
Nille





PostPosted: Smart Devices Native C++ Development, Get/SetCurrentDirectory Top

Hi!

Is there anything similiar to GetCurrentDirectory and SetCurrentDirectory on Pocket PC (currently running Windows Mobile 2003, second edition) I need to retrieve the working directory primarily, and secondarily be able to change it.

Thanks in advance,

Nille



Smart Device Development8  
 
 
Ilya Tumanov





PostPosted: Smart Devices Native C++ Development, Get/SetCurrentDirectory Top

Windows CE (and Windows Mobile which is based on CE) does not have a notion of “current directory” so you can not get/set it. Please use a full paths instead.



 
 
Nille





PostPosted: Smart Devices Native C++ Development, Get/SetCurrentDirectory Top

Ok, thanks! Can I at least get the application directory (i.e. the directory from which the app was started)

Thanks in advance,

Nille


 
 
Peter Foot





PostPosted: Smart Devices Native C++ Development, Get/SetCurrentDirectory Top

See here:-

http://msdn.microsoft.com/library/default.asp url=/library/en-us/dncfhowto/html/HOWTOExecutingAppPath.asp

Or for native code use GetModuleFileName API

Peter



 
 
EricShan





PostPosted: Smart Devices Native C++ Development, Get/SetCurrentDirectory Top

GetModuleFileName((HMODULE)GetCurrentProcessId(),szPath,MAX_PATH);// get from yonsm.net, in Chinese
 
 
Robert Beaubien





PostPosted: Smart Devices Native C++ Development, Get/SetCurrentDirectory Top

Just curious as to why the method is in the CE framework, but not supported Why not just leave it out