ntddk and ntifs redefinition errors

I am writing a minirdr which bases on nulmrx. In the network transport I use TDI wraper written by myself ,it work fine alone. but when I add it to nulmrx , I got lots of basic type redefinitions errors ,such as :
c:\WINDDK\2600.1106\inc\ddk\wxp\ntddk.h(84) : error C2371: ‘PEPROCESS’ : redefinition; different basic types
c:\WINDDK\2600.1106\inc\ifs\wxp\ntifs.h(113) : see declaration of ‘PEPROCESS’
c:\WINDDK\2600.1106\inc\ddk\wxp\ntddk.h(85) : error C2371: ‘PETHREAD’ : redefinition; different basic types
c:\WINDDK\2600.1106\inc\ifs\wxp\ntifs.h(114) : see declaration of ‘PETHREAD’
c:\WINDDK\2600.1106\inc\ddk\wxp\ntddk.h(185) : error C2011: ‘_MODE’ : ‘enum’ type redefinition
c:\WINDDK\2600.1106\inc\ifs\wxp\ntifs.h(1492) : see declaration of ‘_MODE’
,etc. In my Tdi wraper I include “tdi.h” “ndis.h” and “ntifs.h” in nulmrx , so perhaps the headers are contained many duplicate declarations.
Can any one explain this to me? and solve it for me? thanks.

You cannot include ndis and ntifs in the same file. Seperate the code into
a library for the TDI stuff and the driver for the minirdr.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

wrote in message news:xxxxx@ntfsd…
>I am writing a minirdr which bases on nulmrx. In the network transport I
>use TDI wraper written by myself ,it work fine alone. but when I add it to
>nulmrx , I got lots of basic type redefinitions errors ,such as :
> c:\WINDDK\2600.1106\inc\ddk\wxp\ntddk.h(84) : error C2371: ‘PEPROCESS’ :
> redefinition; different basic types
> c:\WINDDK\2600.1106\inc\ifs\wxp\ntifs.h(113) : see declaration of
> ‘PEPROCESS’
> c:\WINDDK\2600.1106\inc\ddk\wxp\ntddk.h(85) : error C2371: ‘PETHREAD’ :
> redefinition; different basic types
> c:\WINDDK\2600.1106\inc\ifs\wxp\ntifs.h(114) : see declaration of
> ‘PETHREAD’
> c:\WINDDK\2600.1106\inc\ddk\wxp\ntddk.h(185) : error C2011: ‘_MODE’ :
> ‘enum’ type redefinition
> c:\WINDDK\2600.1106\inc\ifs\wxp\ntifs.h(1492) : see declaration of
> ‘_MODE’
> ,etc. In my Tdi wraper I include “tdi.h” “ndis.h” and “ntifs.h” in nulmrx
> , so perhaps the headers are contained many duplicate declarations.
> Can any one explain this to me? and solve it for me? thanks.
>
>

I assume you are using DDK 2600, which is pretty old.
At that time, ntifs.h and ntddk.h couldn’t be included together,
and people had to invent lots of hacks how to put make that work.

Currently, there is WDK, which includes both IFS and DDK,
and they are also compilable together.

The only weird thing is that DDK guys fixed this
after 15 years of Windows NT development :slight_smile:

L.