Use a simulator without a network
If you use a simulator to debug a Windows CE program on a computer without a network connection, the debugging environment will prompt a "connection timeout" error after a long connection. In fact, this is because the communication between the debugging environment and the simulator adopts the network connection mode and must have available network connections.
Today, with the popularity of the Internet, such requirements are nothing. However, some people may need to use simulators to debug programs on machines without network connections, such as me. Microsoft documentation provides a solution: Microsoft loopback adapter. To put it bluntly, it is a virtual network connection. Let's take a look at how to use the loopback adapter to debug network communication programs in a standalone environment.
Debugging environment: Windows 2000, Embedded Visual C ++ 3, and Pocket PC 2002 emulator. The program to be debugged: chatter/chatsrvr, a network communication program provided by Microsoft. Chatter runs in the Pocket PC environment, while chatsrvr runs in the Win32 environment. This program can be found in X:/program files/Windows CE tools/wce300/MS Pocket PC/samples/mfc.
First, let's install the loopback adapter.
1. Click Start> set> control panel and select Add hardware. The Add/delete hardware wizard appears.
2. Select "Add/Remove device faults ".
3. In the "select hardware devices" list, select "Add new device ".
4. Select "No, I want to select hardware from the list ".
5. Select "Nic ".
6,In the manufacturers list, selectMicrosoft,SelectMicrosoft loopback Adapter().
7,Complete.
We can see a local connection in the network connection attribute. If your machine already has a real network connection, thenThe loopback adapter adds a NIC to your machine. For more information about loopback adapter, see http://support.microsoft.com/support/kb/articles/Q236/8/69.ASP.
Now we can configure the IP address and subnet mask of the virtual network card, for example:
The following job is to compile chatsrvr in vc6 and open the listener. Start chatter in the simulator. In this way, you can debug the network communication program in a non-network environment.