The Smartphone and Pocket PC emulators that ship with the Windows Mobile 5.0 SDKs are amazing pieces of software. Unlike previous generations which emulated the software, these emulators emulate the hardware. That's right, they are virtual ARM processors, running Windows Mobile.
This means you can install any standard application to them - the same executable file you would install on a Pocket PC device can be installed on the emulator - and it will run. Don't believe me? Download the Visual Studio 2005 Beta and the SDKs and try it out for yourself!
Note: You must install Visual Studio 2005 in order for the emulators to work, as the main emulator "engine" is part of Visual Studio, not the SDKs.
One issue in the past has been how to move files to the emulator. Of course Visual Studio will deploy your application automatically, but it's often the case that you need to move various support files onto the device. This has been quite a chore in the past. Here are two ways you can do this with the latest tools.
The emulators allow you create a shared folder - a folder on your desktop PC, that appears as a Storage Card on the emulated device. Open up the Emulator's properties from "File / Configure.." and then select a Shared Folder from the textbox.
Now this is really cool. The new emulators can actually connect to the copy of ActiveSync running on your desktop, and they behave like a real, physical device. This means you can select Explore, and wander through their file system copying and pasting files. This is by far the simplest way to copy your support files to your emulator. You can even copy CAB files, and test your new installers (something I'll cover in another blog entry very soon).
To get ActiveSync working, first configure ActiveSync itself (you'll need the very latest version), by opening "Connection Settings", and changing the pull-down under "Allow connections to one of the following" to "DMA". DMA is "Direct Memory Access", and allows the emulator to create a direct connection with ActiveSync without any extra wires.
Next, from within Visual Studio, open the Tools menu and select "Device Emulator Manger". From within this dialog, find the current emulator you are using, right click, and select "Cradle".
Then on the emulated device itself, open the ActiveSync tool, and select "Connect via DMA..." from the menu option.
And that's it! You should see ActiveSync starting as if the emulator was a real device. Now if you click Explore on the ActiveSync dialog, you can drill down to whatever location you need to copy and paste files.