Creating an Application to Convert to IPv4/IPv6 (Windows CE 5.0)
Windows CE 5.0
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
- From the File menu, choose New Project or File.
The New Project or File dialog box appears.
- On the Files tab, perform the following steps:
- Choose C++ Source File.
- For file name, type CeClientApp or CeServerApp, depending on the type of application you are creating.
- Leave the default location for the project.
- Platform Builder stores the project in a directory immediately subordinate to your OS design directory. For example, %_WINCEROOT%\PBWorkspaces\<OS design name>\<Project name>.
- Leave Add to Project selected and ensure that the appropriate project, SimpleClient or SimpleServer, is in the associated drop down-box.
- Choose OK.
- In the WorkSpace window, on the FileView tab, expand Source files.
- Open the appropriate source file, CeClientApp.cpp or CeServerApp.cpp.
- 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. - On the File menu, choose Save.
- In the Workspace Window, on the FileView tab, choose the project: SimpleClient or SimpleServer.
- On the Project menu, choose Settings.
The Editing <project path> dialog box appears.
- On the C++ tab, perform the following steps:
- 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.
- For Precompiled Files, type No.
- Remove any files listed in the Precompiled Header text boxes.
- For Executable Entry Point, type the name of the entry point for the application. In this example, type MainWCRTStartup.
- On the General tab, make sure that the target is set to Executable Application.
- 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.
- Choose OK.
- In the Workspace Window, choose the SimpleClient or SimpleServer project.
- From the Build Project menu, select Make a Run-Time Image after Build.
- 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
© 2006 Microsoft Corporation. All rights reserved.