PRB: WDM Driver Written in C++ May Fail to Load (222820)
The information in this article applies to:
- Microsoft Windows 98 Driver Development Kit (DDK)
This article was previously published under Q222820 SYMPTOMS
A WDM driver written in C++ fails to load under Windows 98 if it uses one of the following WDM functions:
RtlLargeIntegerAdd
RtlEnlargedIntegerMultiply
RtlEnlargedUnsignedMultiply
RtlEnlargedUnsignedDivide
RtlLargeIntegerNegate
RtlLargeIntegerSubtract
CAUSE
The WDM.h header file included in the Windows 98 DDK defines these functions differently depending upon whether or not the __cplusplus constant is defined. If the __cplusplus constant is defined, WDM.h defines prototypes for these functions; if __cplusplus is not defined, WDM.h defines inline versions of these functions.
In the case where prototypes are defined for these functions, the resulting driver fails to load because none of these functions are actually implemented in the Windows 98 WDM implementation, and therefore the WDM loader cannot resolve the implicit links to these functions in the driver.
RESOLUTION
Developers who want to use these functions in a WDM driver using C++ should provide their own versions of these functions. Developers can view the inline versions of these functions in WDM.h for an example of how they should be implemented.
Modification Type: | Major | Last Reviewed: | 3/27/1999 |
---|
Keywords: | kbKMode kbprb KB222820 |
---|
|