INFO: Troubleshooting Windows CE Emulation

ID: Q175029

The information in this article applies to:

SUMMARY

The Windows CE Emulation environment is only available on Windows NT 4.0. It enables a developer to develop Windows CE applications that will run on Windows NT. The applications are built using an INTEL based compiler and linker and run as a normal Win32 application.

The following guide describes the problems that can occur in the Emulation environment and how to resolve them.

MORE INFORMATION

Background

Visual C++ for Windows CE installs all of its components into a subdirectory called "WCE". This is located in the DevStudio directory. When installation is complete, the following directory structure exists:

   +--Devstudio
      +--WCE
          +--EMUL
               +--BIN
               +--WINDOWS

This is not the full install tree, but it is the portion of the tree that is required by emulation. The emulation object store exists in a single file called WCEOBSTR.DAT, which is located in the "EMUL" directory. The object store is the storage location for all files, databases, and the registry. When the emulation shell executes a program, the emulation shell copies the file to the "EMUL" directory and executes the program from this location. All of the emulation system components that emulate both SDK and DDK environments are located in the "BIN" directory. There is a second copy of Shell32.exe in the Windows directory. The emulation shell uses this copy of Shell32.exe only for resource retrieval (that is, ICONs). Finally, Serial.Dll exists in the Windows directory and is used by DDK emulation.

In addition to the required directory structure, the installation process also makes an addition to the user's PATH environment variable. That addition is "...\Devstudio\WCE\emul\bin", which is where components of the emulation shell are installed.

Problem Situations

1. Emulation shell fails to run or displays incorrectly.

The Emulation shell, Shell32.exe, can be executed in one of two ways. First you can use Windows NT to launch Shell32.exe, or you can have Microsoft Visual C++ launch the shell when you execute an emulation application.

In both situations, Shell32.exe can fail for the following reasons:

2. Empfile.exe fails to copy files to the Emulation objectstore.

Microsoft Visual C++ uses Empfile.exe to copy an executable module into the emulation object store. In addition, it can be used from the command prompt to perform COPY operations to the emulation objectstore. To determine the command line parameter of Empfile.exe, from a command prompt execute the following command: "empfile /?".

Empfile.exe can fail to copy for the following reasons:

Additional query words:
Keywords          : kbtshoot kbWinCE 
Version           : WINNT:
Platform          : winnt
Issue type        : kbinfo

Last Reviewed: July 3, 1998