Chris De Herrera's Windows CE Website

Discuss.Pocket PC FAQ Forum

Add Pocket PC FAQ to your Favorites
RSS    RSS Feeds
Wiki    Lost?
Custom Search
Subscribe    Print
Table of Contents
Mobile Format

Pocket PC Blast

Pocket PC Magazine Best Site

Website Awards
Website Updates

By Chris De Herrera 
Copyright 1998-2007
 All Rights Reserved
A member of the Talksites Family of Websites

Windows and Windows CE are trademarks of Microsoft
and are used
under license from owner.
CEWindows.NET is not
associated with Microsoft 

All Trademarks are owned
by their respective companies.

Using ActiveSync 4.5 with Visual Studio 2005 and the Emulator
By Chris De Herrera, Copyright 2007
 Version 1.01  Revised 4/5/2007

Shop unique and cheap iPhone cases on


    1. Installation

    2. Initial Configuration

    3. USB Issues

    4. Guest Issues

    5. Firewall and Proxy Issues

    6. Outlook Errors

    7. Synchronization Errors

    8. Mobile Information Server / Outlook Mobile Access

    9. Exchange ActiveSync Error Codes and Solutions

    10. Missing Calendar, Contacts or Tasks Items

    11. Security Advisories

    12. ActiveSync 4.x Troubleshooting Guide - General

    13. ActiveSync 4.x Troubleshooting Guide - Limitations

    14. ActiveSync 4.x Troubleshooting Guide - 85010014

    15. ActiveSync 4.x Troubleshooting Guide - Firewall, VPN, Proxy

    16. ActiveSync 4.x Troubleshooting Guide - Logs & Services

    17. ActiveSync 4.x Troubleshooting Guide - Connection Flow

    18. USB Advanced Network Functionality

    19. Microsoft ActiveSync 4.2 Troubleshooting

    20. Using ActiveSync 4.x and Visual Studio 2005 and the Emulator

    21. Understanding ActiveSync or WMDC Partnerships

After you have installed ActiveSync 4.5 and Visual Studio 2005 (and optionally the Windows Mobile 5.0 or Windows Mobile 6 SDKs) you will need to perform additional steps to use ActiveSync with the emulators.  This FAQ covers how to setup ActiveSync, cradle the emulator and setup and manage the partnership.  You will need to use ActiveSync if you want to test tcp/ip based applications on the emulator.

Setting up ActiveSync

First open ActiveSync and click on File – Connection Settings.  You will see the screen below.  Click the box on the “Allow connections to one of the following:”  and select DMA in the drop down.

Even after you have setup ActiveSync you will have some additional steps to connect using ActiveSync.  By default when you run a program for the Windows Mobile Device, you are prompted whether or not to use the emulator.  Select the emulator and click deploy.

 When the emulator is started, the device is not cradled.  So ActiveSync does not see the emulator.  This is true even though Visual Studio sees the device and transfers the program you are compiling.

To cradle the device, you will need to open the Device Emulator Manager.  This is done in Visual Studio 2005 under Tools – Device Emulator Manager.  You will see the screen below:

Scroll down in the list and you will see the emulator you chose based on the form size and the operating system.  It has the green arrow to the right before the name.  This means that the device is not cradled.

To cradle the device, right click on the emulator and choose the menu option Cradle.  To uncradle right click on the emulator and choose the menu option to Uncradle.  Also, you can uncradle and cradle the emulator as many times as you need to using the Device Emulator Manager.

The device in the Device Emulator will look as follows when it is cradled:

The Device Emulator Manager will continuously run until manually close it.  To close it, right click on the icon in the tray and select Exit.

Setting up the Partnership

When you begin to cradle the device you will see the following.  Keep in mind that the emulator does not support synchronization of Outlook items until Outlook has been setup initially.

Click ok and you will see ActiveSync begin to build the partnership:

If you click Cancel then your emulator is connected as a Guest.  You will not be able to synchronize any items however you can copy files to the device.

The next screen is where you choose what items are synchronized.  By default Favorites is checked.  I suggest that you do not choose to synchronize any data unless your application requires it.   Click next after you have selected the options you wish.

Then you will see the following screen:

Once you click Finish, ActiveSync will save the settings.

Then ActiveSync will show that the emulator is connected:

Managing Partnerships

Be careful at this point!  ActiveSync has a partnership with the emulator however the emulator state has not been saved.  If you close the emulator and do not save the state you will see the following error.  Then you will need to delete the partnership.  Click Cancel and then uncradle the device and then delete the partnership.

After you have delete the partnership you will need to open ActiveSync and click on File – Connection Settings and uncheck the “Allow connections to one of the following:”  and click OK.  Then click on File – Connection Settings and check the “Allow connections to one of the following:”  and click OK.

If you close the emulator you will have to delete the partnership.  This can be done by using File – Delete Mobile Device and select the partnership name.  Be careful not to delete any other partnership or you will have to setup a new partnership for that device.

Also, you cannot delete the partnership while it is in use or you will see the following error:

So when you exit out of the emulator, you are prompted whether or not to save the state of the emulator.  Click on Yes.  If you save the state and the device is cradled, it will be cradled automatically the next time you launch the emulator.

If you deleted the partnership in ActiveSync you will need to clear the state in the emulator.  This is done after the emulator is opened and you click on File – Clear Saved State.

Using TCP/IP in the Emulator

By default ActiveSync with the emulator works differently than ActiveSync does with a device.  When you use a real device, ActiveSync uses a new network connection (RNDIS for Windows Mobile 5.0/6 or PPP for prior devices) with an IP address on the PC and on the device to communicate between them.  With the emulator, ActiveSync does not use a new network connection and it does not use an IP address on the device or the PC.  Instead all requests to the internet are proxied to the IP address of the network adapter.   So if you are using local services you will need to enter the IP address of the local adapter into the device in order to connect to these services. You can find the IP address on the PC by going to the command prompt (Start - Run - CMD) and typing IPCONFIG /ALL.  The IP address will be the network address displayed.


If your problem is not resolved here, try Bev Howard's Solving ActiveSync Issues, the Microsoft ActiveSync Troubleshooter or Microsoft's Knowledge Base search on ActiveSync or Microsoft's Knowledge Base search on Mobile Information Server.

Get the Latest Tablet PC News

Return to Chris De Herrera's Windows CE Website