How to load input files on Emulator

I am trying to build a simple test app that loads a text file via the SmartPhone 2003 SE Emulator, however I can't figure out where to store my input files on the desktop so that the Emulator can see them.

Any help appreciated.

[231 byte] By [jonfroehlich] at [2008-2-7]
# 1
The easiest way is to use folder sharing. Under File\Configure\General Tab set the folder sharing directory to any directory on your desktop. Put your text files into that directory and they will be accessible from "\Storage Card\" inside the Windows Mobile OS.

Thanks,

Vladimir

VladimirFedorov at 2007-9-9 > top of Msdn Tech,Smart Device Development,Device Emulator General...
# 2
Vladimir,

I appreciate your response. Unfortunately, I have been unable to get this to work in VS2005 b2 with Visual C#. Are your instructions for VS2003?

The way to set the folder sharing directory with VS2005 b2 is to go to File Menu -> Tools -> Options -> Device Tools -> Devices -> Smartphone 2003 SE Emulator -> Properties -> Emulator Options. The Emulator Options button opens a Emulator Properties dialog box. In the General tab of this dialog, you can input a "Shared folder" path. However, despite putting my input files in that path, when I run the emulator I am still unable to see them and get a FileNotFoundException.

I blogged about my problem in more detail here: http://csharponphone.blogspot.com/2005/07/reading-in-files-on-smartphone.html. Any more suggestions/advice would be appreciated.

j

jonfroehlich at 2007-9-9 > top of Msdn Tech,Smart Device Development,Device Emulator General...
# 3
The directions were for VS2005 DE for configuration of the running instance of the emulator. There are three emulator configurations that exist - global, local saved and instance. The Global configuration is what you set under Tools\Options\Device Tools\Pick Platform\Properties\Emulator Options. The global configuration will be applied to an emulator if there is no local saved state. If you have created a local saved state - the global configuration is ignored until you clear the saved state. The instance configuration is accessed after the emulator is started via File\Configure (on the emulator itself) and is only applied to the instance that is running.

So if you start the emulator and click on the emulator File menu, select Configure option and then select General Tab - you should see the "Shared Folder" textbox.

The folder is accessed as "\Storage Card\". My guess is that you changed your global configuration but it was not applied because you had a local saved state. You can verify that the shared folder works correctly by craddling your emulator with Device Emulator Manager and using ActiveSync to browse the filesystem.

Thanks,

Vladimir

VladimirFedorov at 2007-9-9 > top of Msdn Tech,Smart Device Development,Device Emulator General...
# 4
This works great, thanks Vladimir.
jonfroehlich at 2007-9-9 > top of Msdn Tech,Smart Device Development,Device Emulator General...