Compartilhar via


Creating an Application to Convert to IPv4/IPv6 (Windows CE 5.0)

Send Feedback

You can view the project you created in Creating a New Project for Converting to IPv4/IPv6. In the Workspace window, choose the FileView tab, and then navigate through the Projects tree to find your project.

After you complete the tasks in Creating a New Project for Converting to IPv4/IPv6, you are ready to perform this procedure.

You will use this same procedure to create both a server and a client application.

To create an application to convert to IPv4/IPv6

  1. From the File menu, choose New Project or File.

    The New Project or File dialog box appears.

  2. On the Files tab, perform the following steps:

    1. Choose C++ Source File.
    2. For file name, type CeClientApp or CeServerApp, depending on the type of application you are creating.
    3. Leave the default location for the project.
    4. Platform Builder stores the project in a directory immediately subordinate to your OS design directory. For example, %_WINCEROOT%\PBWorkspaces\<OS design name>\<Project name>.
    5. Leave Add to Project selected and ensure that the appropriate project, SimpleClient or SimpleServer, is in the associated drop down-box.
    6. Choose OK.
  3. In the WorkSpace window, on the FileView tab, expand Source files.

  4. Open the appropriate source file, CeClientApp.cpp or CeServerApp.cpp.

  5. Replace the information in source file with the sample code as shown in the following table.

    Code sample Description
    IPv4-only Client Code Opens a TCP port connection on port 1234, and then sends an English text string to the server.
    IPv4-only Server Code Responds to the client by echoing the packet, and then closes the port.
  6. On the File menu, choose Save.

  7. In the Workspace Window, on the FileView tab, choose the project: SimpleClient or SimpleServer.

  8. On the Project menu, choose Settings.

    The Editing <project path> dialog box appears.

  9. On the C++ tab, perform the following steps:

    1. For Executable Entry Point, type the name of the entry point for the application. In this example, type MainWCRTStartup.

      For more information about executable entry points, see /ENTRY.

    2. For Precompiled Files, type No.

    3. Remove any files listed in the Precompiled Header text boxes.

  10. On the General tab, make sure that the target is set to Executable Application.

  11. On the Link tab, for Additional Libraries, add the ws2.lib.

Note   This example uses two libraries: ws2.lib provides Winsock functions that you need in network applications; coredll.lib provides the core functionality that an application needs. You must separate the two entries with a space and enter the entire path. The path to ws2.lib is the same as the path to coredll.lib. You can copy the existing path.

  1. Choose OK.
  2. In the Workspace Window, choose the SimpleClient or SimpleServer project.
  3. From the Build Project menu, select Make a Run-Time Image after Build.
  4. From the Build Project menu, choose Build Current Project

See Also

How to Convert an Application from IPv4 to IPv4/IPv6

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.