How To Deploy a Visual C++ Application in an Embedded Platform (254507)



The information in this article 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.
  1. Start with your Platform Builder project opened in the Platform view.
  2. 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).
  3. In the Platform window, click the Parameter View tab that is located at the bottom of the window.
  4. In the Platform window, open the Project Specific Files folder.
  5. 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.)
  6. 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
    ;  Name          Path                               Memory Type
    ;  ------------  ---------------------------------  -----------
       MYAPP.EXE     $(_FLATRELEASEDIR)\MYAPP.EXE       NK 
    					
  7. Copy your application files into the same release folder as the platform's other Windows CE components. For example:

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

  8. Build the image: from the Platform menu in the IDE, click Build Platform.
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:
  • It could not find a module in the specified path.
  • 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 <exename>. For example, a Windows CE GUI application would show the following:

    9 subsystem (Windows CE GUI)

REFERENCES

For additional information how to deploy a Visual Basic application, click the article number below to view the article in the Microsoft Knowledge Base:

258854 How To Deploy a Visual Basic Application in an Embedded Platform


Modification Type:MinorLast Reviewed:10/11/2004
Keywords:kbhowto KB254507 kbAudDeveloper