Use a simulator without a network

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.