Using 2003SP1 DDK for Windows 2000 drivers

Discussion in 'Windows Vista Drivers' started by Nathan G, Oct 20, 2005.

  1. Nathan G

    Nathan G Guest


    I have a driver which compiled just fine under an old Windows 2000 DDK.

    I wanted to compile it using the 2003SP1 DDK, which I believe is the latest.

    I run "setenv mydir fre W2K". When I attempt to compile, I get the following

    e:\ddk2003sp1\inc\w2k\winbase.h(280) : error C2061: syntax error :
    identifier 'CRITICAL_SECTION'
    e:\ddk2003sp1\inc\w2k\winbase.h(280) : error C2059: syntax error : ';'
    e:\ddk2003sp1\inc\w2k\winbase.h(281) : error C2061: syntax error :
    identifier 'PCRITICAL_SECTION'
    e:\ddk2003sp1\inc\w2k\winbase.h(281) : error C2059: syntax error : ';'
    e:\ddk2003sp1\inc\w2k\winbase.h(282) : error C2061: syntax error :
    identifier 'LPCRITICAL_SECTION'
    e:\ddk2003sp1\inc\w2k\winbase.h(282) : error C2059: syntax error : ';'
    e:\ddk2003sp1\inc\w2k\winbase.h(284) : error C2061: syntax error :
    e:\ddk2003sp1\inc\w2k\winbase.h(284) : error C2059: syntax error : ';'
    e:\ddk2003sp1\inc\w2k\winbase.h(285) : error C2061: syntax error :
    e:\ddk2003sp1\inc\w2k\winbase.h(285) : error C2059: syntax error : ';'
    e:\ddk2003sp1\inc\w2k\winbase.h(286) : error C2061: syntax error :
    e:\ddk2003sp1\inc\w2k\winbase.h(286) : error C2059: syntax error : ';'
    e:\ddk2003sp1\inc\w2k\winbase.h(289) : error C2061: syntax error :
    identifier 'LPLDT_ENTRY'
    e:\ddk2003sp1\inc\w2k\winbase.h(289) : error C2059: syntax error : ';'
    e:\ddk2003sp1\inc\w2k\winbase.h(1135) : error C2373: 'InterlockedIncrement'
    : redefinition; different type modifiers
    e:\ddk2003sp1\inc\ddk\w2k\ntddk.h(5230) : see declaration of
    e:\ddk2003sp1\inc\w2k\winbase.h(1142) : error C2373: 'InterlockedDecrement'
    : redefinition; different type modifiers
    e:\ddk2003sp1\inc\ddk\w2k\ntddk.h(5237) : see declaration of
    .... etc ....

    The only system header file I include is <ntddk.h>. The compile command line
    is as follows.

    cl -nologo -Ii386\ -I. -Ie:\ddk2003sp1\inc\mfc42 -I.. -I..\..\..\kernel
    -I..\..\..\inc -I..\..\common -Iobjfre_w2K_x86\i386 -Ie:\ddk2003sp1\inc\w2K
    -Ie:\ddk2003sp1\inc\w2K -Ie:\ddk2003sp1\inc\ddk\w2K
    -Ie:\ddk2003sp1\inc\ddk\wdm\w2K -Ie:\ddk2003sp1\inc\crt -D_X86_=1 -Di386=1
    -DWINNT=1 -D_WIN32_WINNT=0x0500 /DWINVER=0x0500 -D_WIN32_IE=0x0501
    -D_DLL=1 /c /Zl /Zp8 /Gy /Gm- -cbstring /W3 /WX /Gz /GX- /GR- /GF /GS
    /G6 /Ze /Gi- /QIfdiv- /hotpatch -Z7 /Oxs /Oy-
    -FIe:\ddk2003sp1\inc\w2K\warning.h .\mysrc.c

    Any obvious reason why I should get all these errors?

    Nathan G, Oct 20, 2005
    1. Advertisements

  2. Nathan G

    fat_boy Guest

    I found stuff like IoReuseIrp() missing form the 2k headers with this
    DDK. In this instance, because it is a valid function in 2k, I had to
    define it myself, based on the wxp definition.

    Just search the headers for these defines, and work out either from
    #defines or from which directory they are in, what you have to do to
    get it in your code. Either define it yourself, or put in a /D xxx to
    get that section of header in.
    fat_boy, Oct 21, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.