Microsoft KB Archive/254507

= How To Deploy a Visual C++ Application in an Embedded Platform =

Article ID: 254507

Article Last Modified on 10/11/2004

-

APPLIES TO


 * Microsoft Windows CE Platform Builder 2.12

-



This article was previously published under Q254507



SUMMARY
The Platform Builder 2.12 documentation references the Wceload.exe tool in the topic titled "Working with the Shell." The Release Notes for Windows CE Platform Builder briefly mentions that Wceload.exe is obsolete. This article gives more background on the purpose of WCELOAD, why it does not apply to embedded systems, and provides steps as an example of how to deploy an application as part of an embedded system by using Windows CE.



MORE INFORMATION
The Wceload.exe tool is used for installing an application for Windows CE that has been packaged by using the CAB Wizard (CabWiz) for Windows CE. The tool is a device-side component of the Windows CE Application Installation (AppInstall) tools and is included on most Windows CE-based retail devices, such as Palm-size PC and Handheld PC. More information about the AppInstall mechanism can be found in the MSDN technical article "Creating an Application Installation Package."

Because Wceload.exe is part of the retail platform shell and not part of the core operating system, it is not distributed with Platform Builder. Wceload.exe works along with the desktop Application Manager (Ceappmgr.exe) to download and install applications on a Windows CE retail platform. Application Manager was not intended to be used with Platform Builder-based custom embedded systems.

Starting with Platform Builder 3.0, Wceload.exe is included. This opens the option to deploy an application to a custom embedded device by using the Application Manager with Microsoft ActiveSync. Typically, an application used within an embedded system should be included with the other components of the platform image (for example, Nk.bin). That is, the application is "built in" as opposed to being installed. Following are examples of how to include your application modules and run-time support components by using Platform Builder 2.12:

Adding an Application to a Platform Image
This procedure assumes that you have already created your application by using a software development kit (SDK) that is exported for this platform.  Start with your Platform Builder project opened in the Platform view. Add the necessary run-time support: Determine what run-time support is needed with your application and drag it from the Catalog view window to the Platform view window. For example, if you have used MFC in your application, select the MFC component from the Catalog\Runtimes\VC tree in the Catalog window, and drag it to the Platform window (the Platform window must be in Component View, not Parameter View). In the Platform window, click the Parameter View tab that is located at the bottom of the window. In the Platform window, open the Project Specific Files folder. Double-click the Project.bib file. (This opens the source Project.bib file in the common project folder. During the build process, this file overwrites the Project.bib file in the release folder. If you edit the wrong copy of the Project.bib file, your changes will not be included.)  The Project.bib file has a MODULES section and a FILES section. List your application executables (.exe and .dll files) in the MODULES section. List any non-executables, such as data files, in the FILES section. For example: MODULES MYAPP.EXE    $(_FLATRELEASEDIR)\MYAPP.EXE       NK                      Copy your application files into the same release folder as the platform's other Windows CE components. For example:
 * Name         Path                               Memory Type

C:\WINCE212\PUBLIC\MAXALL\RelDir\X86_Debug

</li> Build the image: from the Platform menu in the IDE, click Build Platform.</li></ol>

If there are no errors from MAKEIMG during the build, your application will be included as part of the platform image just created. When the image is downloaded to the device, the application modules will be located in the \Windows folder on the device.

If MAKEIMG reports an error, it is typically for the following reasons: <ul> It could not find a module in the specified path.</li> The file listed in the MODULES section is not in Portable Executable (PE) format or is not built for the Windows CE target. You can verify the modules target by reading the PE header subsystem by using DUMPBIN /headers. For example, a Windows CE GUI application would show the following:

9 subsystem (Windows CE GUI)

</li></ul>

<div class="references_section">