Microsoft KB Archive/175029

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 11:07, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

INFO: Troubleshooting Windows CE Emulation

Q175029



The information in this article applies to:


  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows CE





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:

    • Some shell required components (that is, filesys.exe) cannot be located. Check to ensure that your PATH environment variable contains the path to your emulation BIN directory (that is, "...\Devstudio\WCE\emul\bin").
    • The emulation objectstore is corrupt. Replace the Wceobstr.dat file located in the "...\WCE\EMUL" directory with a new copy from the installation CD. On the CD the location of the DAT file is "...\wcedev\Wce\Emul".
    • Shell32 cannot communicate with filesys.exe. This problem is not so obvious. If you are having problems, then execute "filesys.exe -c". This will cleanly shutdown the emulation object store and allow it to properly restart the next time Shell32.exe is executed.
  1. 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:

    • The emulation objectstore is corrupt. Replace the Wceobstr.dat file located in the "...\WCE\EMUL" directory with a new copy from the installation CD. On the CD the location of the DAT file is "...\wcedev\Wce\Emul".
    • The emulation object store is full.
    • In Microsoft Visual C++, Empfile.exe can fail to execute if Microsoft Visual C++ cannot locate the application. Check your directories options for each platform and make sure that the "Executable files" directory list includes the path to your SharedIDE components (that is, "...\DevStudio\SharedIDE\bin").

Additional query words:

Keywords : kbtshoot kbOSWinCEsearch
Issue type : kbinfo
Technology : kbAudDeveloper kbWin32sSearch kbWin32API


Last Reviewed: January 15, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.