Microsoft KB Archive/244316

= PRB: Preprocessor Flag Required to Compile/Link to Platform-Dependent Functions from the Visual C++ IDE =

Article ID: 244316

Article Last Modified on 2/11/2004

-

APPLIES TO


 * Microsoft Windows CE Platform Builder 2.11
 * Microsoft Windows CE Platform Builder 2.12

-



This article was previously published under Q244316



SYMPTOMS
Program or device driver source code that contains certain platform-dependent Windows CE function calls, such as KernelIoControl, will not build from within the Microsoft Visual C++ Integrated Development Environment (IDE).

Build errors, such as "C2065: undeclared identifier", occur.



CAUSE
The header file definitions required for these function calls are not included by the preprocessor unless the WINCEOEM preprocessor definition is defined at the project level. The WINCEOEM definition causes additional header files to be included, which provide prototypes and macros required for these function calls.



RESOLUTION
To resolve this problem, add the WINCEOEM definition to your project build settings:
 * 1) On the Project menu, click Settings.
 * 2) Select the C/C++ tab in the Settings dialog box.
 * 3) Scroll to the end of the preprocessor definitions edit box.
 * 4) Add a comma and WINCEOEM to the end of the list.
 * 5) Rebuild your project.



MORE INFORMATION
The following is a partial list of functions that require the WINCEOEM preprocessor flag:
 * TouchCalibrate
 * KernelIoControl
 * InterruptInitialize
 * InterruptDone
 * GwesPowerOffSystem
 * SystemIdleTimerReset

Use of these function calls may limit your driver or application to a specific hardware platform. The WINCEOEM preprocessor definition is intended for OEMs, independent hardware vendors, and embedded system software developers.

Keywords: kbprb KB244316

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.