Partager via


Virtual PC Network Driver

Making Emulator to connect to the Network using Virtual Cradle with Active Sync and without the need for a Virtual Networking Switch Driver.

If you recently installed Visual Studio 2005 and see this message as soon as you start the emulator

Failed to open the VPC Network Driver. Verify that the driver is installed, or install the driver from the Web download location at https://go.microsoft.com/fwlink/?linkid=46859

Or you are wondering why you are unable to connect to the internet from the Browser in the emulator and not getting network connectivity with the emulator.

Here is information you will find useful.

1. The Virtual PC Network driver was removed from the default setup of Visual Studio 2005. There is a chance that you already have this driver on your machine. This can be determined by looking at the Properties of your Network Connection. Some of the applications that install this driver are Platform Builder, eMbedded Visual C++, Beta 1 and Beta 2 of Visual Studio 2005, Virtual PC and Virtual Server.

This is what having this driver looks like in the properties page.

One reason why this error message for the driver comes up is if you have Beta 2 or an older version of VS on this machine. This is because the saved states for the emulator in Beta 2 had this flag on by default and the upgrade to RTM does not recreate these files. So in that case you continue to use Beta 2 saved state images and keep seeing this dialog. The quickest way to get this of this is to

For each user on the machine rename the %userprofile%\Application Data\Microsoft\Device Emulator\ folder to %userprofile%\Application Data\Microsoft\Device Emulator_B2\

This will back up (not delete) any of the Beta 2 images so you can start using the new images which don’t have this flag on.

The other option is to Clear the saved state using the emulator. Do this only if you don’t need the saved states. This is in the File menu of the emulator.

After that exit and don’t save the state when prompted. This should get rid of the dialog at start up asking for the driver.

You can also clear the saved state using the Device Emulator Manager. This tool is available from the Tools Menu in Visual Studio

This is how you clear the state using the Device Emulator Manager.

The next question now is how do you get Network connectivity to the emulator if this driver is not there ?

Yes there is a very easy way. We now have an option to connect the emulator via a virtual Cradle to active sync.

First make sure you machine is set correctly to use DMA which is how we connect to the emulator instead of the TCP/IP route.

  1. Make sure you have Version 4.0 of Active Sync
  2. The Check to ensure DMA is enabled in Active Sync. To do that double click on the Active Sync Icon and Check the connection settings

Make sure Allow Connection to one of the following is checked and it is set to DMA. If this is not set Virtual Cradle will NOT work.

The start the device emulator manager one more time. If the emulator is already running you will see an icon next to it showing it is running.

If not, the right click and say Connect. That will start the emulator.

Once running, Right click and select Cradle

You will see Active Sync spring into action and establish connectivity with the emulator.

This is what will show in the emulator when connection is being made

After this your machine actually believes it has a real device connected to it.

To try you can now deploy a project to a device and you will see it run on the emulator much like on a real device.

As you can see I now have internet connectivity from the browser using Active Sync

The emulator which is cradled will show a different Icon

I have seen some people say that Nothing happens when the select cradle. In that case try to press the Connect… button the Active Sync as shown in the picture below.

This should get both your concerns about not having the VPC Driver and getting connectivity from the emulator addressed.

Amit Chopra

Comments