Microsoft KB Archive/232535

{|
 * width="100%"|

BUG: Windows NT 4.0 DDK May Report Build Errors When Platform SDK Is Installed

 * }

Q232535

-

The information in this article applies to:


 * Microsoft Windows NT 4.0 Driver Development Kit (DDK)

-

SYMPTOMS
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

CAUSE
The headers ( *.h ) for the Platform SDK contain some enhancements for 64-bit Windows NT, including a redefinition of WPARAM, LPARAM, and LRESULT:

Old Definition (windef.h)
/* Types use for passing & returning polymorphic values */ typedef UINT WPARAM; typedef LONG LPARAM; typedef LONG LRESULT;

New Definition (windef.h)
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.

RESOLUTION
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.

Users can change the Include environment variable using one or both of the following methods:


 * By using the System applet in Control Panel. Click the Environment tab and change the include entry under User Variables.
 * By modifying the Setenv.bat file found in the Platform SDK install directory. Search for the keyword "Include".

STATUS
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 kbOSWinNT400 kbDSupport kbGrpDSNTDDK

Issue type : kbbug

Technology : kbWinNTsearch kbWinNT400xsearch kbAudDeveloper kbWinDDKSearch kbWinNT400DDK