views:

92

answers:

1

Can you tell me where to store application specific data on a Win Mobile phone.

Let's say my app is named MyApp and I install it in the program files folder. I have two initial files in My Documents that it uses with no problems. But what is the correct destination on the device?

Also, when I do an uninstall, do I leave the modified app data?

A: 

There's no "right" answer for this. Where does your source code look for those files? That's where you have to look.

All file path is CE must be fully qualified, so maybe it's "\Program Files\MyApp\Myfile.ext" (though it would be highly advised to use SHGetSpecialFolderPath so your app can survive non-english installs).

Or maybe you need it in the same folder as the application. For that, you'd use GetModuleFileName and then truncate the application executable name to get the path.

For uninstall, again that depends. For logo certification you have to remove any files you create (a custom setup DLL is a good way to do this), but if you're not looking for certification, how you deal with it is up to you.

ctacke