BUG: Windows NT 4.0 DDK May Report Build Errors When Platform SDK Is InstalledID: Q232535
|
When building projects using the Windows NT 4.0 DDK, with the Platform SDK installed, the following build errors may be generated:
c:\ddk\src\mmedia>build -ceZ
BUILD: Compile and Link for i386
BUILD: Compiling c:\ddk\src\mmedia\drvlib directory
Compiling - drvlib\drvlib.c for i386
Compiling - drvlib\reslist.c for i386
Compiling - drvlib\reslist1.c for i386
c:\mssdk\include\windef.h(170) : error C2061: syntax error : identifier 'WPARAM'
c:\mssdk\include\windef.h(170) : error C2059: syntax error : ';'
c:\mssdk\include\windef.h(171) : error C2061: syntax error : identifier 'LPARAM'
c:\mssdk\include\windef.h(171) : error C2059: syntax error : ';'
c:\mssdk\include\windef.h(172) : error C2061: syntax error : identifier 'LRESULT'
c:\mssdk\include\windef.h(172) : error C2059: syntax error : ';'
Compiling - drvlib\registry.c for i386
The headers ( *.h ) for the Platform SDK contain some enhancements for 64-bit Windows NT, including a redefinition of WPARAM, LPARAM, and LRESULT:
/* Types use for passing & returning polymorphic values */
typedef UINT WPARAM;
typedef LONG LPARAM;
typedef LONG LRESULT;
typedef UINT_PTR WPARAM;
typedef LONG_PTR LPARAM;
typedef LONG_PTR LRESULT;
The Windows NT 4.0 DDK does not define these new types, and some samples do not include the necessary headers to define this value.
Users can force use of the old headers by changing the order of the Include environment variable. For example, if your Include environment variable resembles the following:
include=c:\mssdk\INCLUDE;C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\
Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include
it should be changed by moving the entry "c:\mssdk\INCLUDE" to the end of the list, as follows:
include=C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\
Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include;c:\mssdk\INCLUDE
This action forces the DDK build environment to use the headers from the Visual C++ environment before it uses the Platform SDK. Microsoft has confirmed this to be a bug in the Windows NT 4.0 DDK. This problem does not occur in the Windows 2000 DDK.
Additional query words:
Keywords : kbDDK kbNTOS400 kbDSupport kbGrpNTDDK
Version : winnt:
Platform : winnt
Issue type : kbbug
Last Reviewed: July 16, 1999