Get/SetCurrentDirectory

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

[291 byte] By [Nille] at [2008-1-6]
# 1

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.

IlyaTumanov at 2007-9-28 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 2

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

Thanks in advance,

Nille

Nille at 2007-9-28 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 3

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

PeterFoot at 2007-9-28 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 4
GetModuleFileName((HMODULE)GetCurrentProcessId(),szPath,MAX_PATH);// get from yonsm.net, in Chinese
EricShan at 2007-9-28 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 5
Just curious as to why the method is in the CE framework, but not supported? Why not just leave it out?
RobertBeaubien at 2007-9-28 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...