Building Applications for Emulation

To build an application for emulation, link your project to the following libraries:

The functions in these five libraries are declared in Windows.h. To add messaging functionality to your application, include Msgstore.h. To add e-mail functionality, include Addrstor.h.

    To build an application for emulation

  1. From the Microsoft® Visual Studio™ IDE, on the File menu, click New.
  2. In the New dialog box, click the Projects tab, and select Win32 Application.
  3. In the Platforms check box , select Win32 (WCE x86 em).
  4. In the New dialog box, type a text string in the Project Name field and click OK.
  5. After you build and link the executable file, Visual Studio will display the Copying Executable Path And File Name dialog box. Enter the destination location for your executable file, and then click OK.

Note This dialog box displays only when you build and link a new executable file. When you rebuild an application, use the Remote Object Viewer to copy and move the executable file to a different folder in the simulated file system, or use the following procedure.

    To move the executable file of a rebuilt application

  1. On the Project menu, click Settings.
  2. In the Project Settings dialog box, click the Debug tab.
  3. Clear the Remote Executable Path and File Name field and click OK. This will cause Visual Studio to display the Copying Executable Path And File Name dialog box during the next build. You can also move the executable file by changing the file path that appears in the Remote Executable Path and File Name field and clicking OK.

    To link a library file to your application

  1. Load your project workspace in Visual Studio.
  2. On the Projects menu, click Settings.
  3. In the Project Settings dialog box, click the Link tab.
  4. If the library file is not linked to your project, type the library file name in the Object/library modules field and click OK.

    To implicitly link a DLL to your application

  1. Load your project workspace in Visual Studio.
  2. On the Tools menu, click Options.
  3. In the Options dialog box, click the Directories tab.
  4. In the Show directories for drop-down box, choose the correct file type.
  5. Make sure the drive letters and paths to the directories containing the DLLs you want to link to your project are correctly listed in the Directories field.
  6. Click OK, then on the Project menu, click Settings.
  7. In the Project Settings dialog box, click the Link tab.
  8. Make sure the names of the DLLs you want to link to your project are correctly listed in the Object/library modules field.
  9. Click OK.