Pocket PC Development

ehelin

Freshman
Joined
Oct 11, 2005
Messages
48
Hi:

Forgive me if this is the wrong forum...didn't see a forum that applies to this. Are there any good sources on how to do file IO on pocket pc development? Application.startuppath isn't an option here and it is not apparent to me how to test with file IO (i.e. get files read in and out).

Any thoughts would be appreciated.

Thanks!

Eric
 
You can get the Application startup path with the following code.
C#:
string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
Working with files in general is achieved in the same way on the Compact Framework as it is in normal .Net application. The System.IO namespace contains most of the objects needed. I'm not sure if that answers your question or not.
 
Thanks Cags!

It answers part of my question...the other part, when developing, how to I get my test files over to the emulator? Specifically, I am using an xml file and I put it in the shared directory (set through the configuration menu on the emulator), but the emulator never finds the file. I have gone through the special folder enumeration as well as tried various hard coded versions.

My boss told me that when he was working on it, there is a way to move files from the development computer to the emulator (ironically both running on the same PC)...basically a shared directory. But his laptop crashed and all of that was lost.

The path he used was "\program files\PNC\WBData.xml"...thoughts?

Eric
 
I use an actually Pocket PC for testing rather than the Emulator so I'm not entirely sure (as I can copy files over via ActiveSync) how well this will work but try giving this
a go.
 
Found the answer...Remote File Viewer. Select Start -> Programs -> Microsoft Visual Studio 2005 -> Visual Studio Remote Tools -> Remote File Viewer.

It will prompt you for the device you want to connect to...here, select the emulator for the pocket pc. It will give you a view of the file system on the emulator...navigate to where you want your file loaded to and the select File -> Export. Select the file you want moved over to the emulator from your development machine and it will be copied over. Then, when referring to this file in the IDE, refer to it from the PDA perspective (i.e. if you move a file to program files, the path starts "program files\").
 
Back
Top