Using NT Kernel Function in NDIS Driver

Hi all,

How can I use functions from ntddk.h in NDIS drivers?
when I inlcude ntddk.h I get type redifinition errors.

thanks in advance

johnny


Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

“Hamidreza Habibi” wrote in message
news:xxxxx@ntdev…
>
> How can I use functions from ntddk.h in NDIS drivers?
>

Include ntddk.h and ndis.h in separate modules (i.e. different files). This
is a pain, but it’s the only solution to the best of my knowledge.

Peter
OSR


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You may also be able to write a NDIS_WDM driver. Add this define to your
SOURCES file:

-DNDIS_WDM=1

This brings in a subset of ntddk.h that is found in wdm.h. If this subset is
sufficient, then you may not need ntddk.h.

Regards,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:

----- Original Message -----
From: Peter Viscarola
Newsgroups: ntdev
To: NT Developers Interest List
Sent: Friday, June 01, 2001 4:15 PM
Subject: [ntdev] Re: Using NT Kernel Function in NDIS Driver

> “Hamidreza Habibi” wrote in message
> news:xxxxx@ntdev…
> >
> > How can I use functions from ntddk.h in NDIS drivers?
> >
>
> Include ntddk.h and ndis.h in separate modules (i.e. different files).
This
> is a pain, but it’s the only solution to the best of my knowledge.
>
> Peter
> OSR
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@pcausa.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</http:></http:>

Well, yet another solution :slight_smile:

#define BINARY_COMPATIBLE 0

prior to #include <ndis.h> or add -DBINARY_COMPATIBLE=0 to SOURCES file. As
a result ndis.h file includes ntddk.h. See the following section in the
ndis.h file (w2k SP1 DDK):

#else // BINARY_COMPATIBLE

#if !NDIS_WDM

//
// The definitions available in ntddk.h are intended for use only by full
// MAC drivers. They must not be used directly by miniport drivers.
//

#include <ntddk.h>

#else

#include <wdm.h>

#endif

#endif // else BINARY_COMPATIBLE

…and ignore included statement about MAC drivers. You can use NT kernel
function in the miniport driver if you know what you’re doing. Of course,
the result isn’t binary compatible with w9x and you won’t get WHQL.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]

> ----------
> From: Thomas F. Divine[SMTP:xxxxx@pcausa.com]
> Reply To: NT Developers Interest List
> Sent: Friday, June 01, 2001 10:18 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: Using NT Kernel Function in NDIS Driver
>
> You may also be able to write a NDIS_WDM driver. Add this define to your
> SOURCES file:
>
> -DNDIS_WDM=1
>
> This brings in a subset of ntddk.h that is found in wdm.h. If this subset
> is
> sufficient, then you may not need ntddk.h.
>
> Regards,
>
> Thomas F. Divine
>
> PCAUSA - Toolkits & Resources For Network Software Developers
> NDIS Protocol - NDIS Intermediate - TDI Client
> http: - http:
>
> ----- Original Message -----
> From: Peter Viscarola
> Newsgroups: ntdev
> To: NT Developers Interest List
> Sent: Friday, June 01, 2001 4:15 PM
> Subject: [ntdev] Re: Using NT Kernel Function in NDIS Driver
>
>
> > “Hamidreza Habibi” wrote in message
> > news:xxxxx@ntdev…
> > >
> > > How can I use functions from ntddk.h in NDIS drivers?
> > >
> >
> > Include ntddk.h and ndis.h in separate modules (i.e. different files).
> This
> > is a pain, but it’s the only solution to the best of my knowledge.
> >
> > Peter
> > OSR
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@pcausa.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</http:></http:></wdm.h></ntddk.h></ndis.h>

“Hamidreza Habibi” wrote in message
news:xxxxx@ntdev…
>
> How can I use functions from ntddk.h in NDIS drivers?
>

Include NTDDK.H in a separate module (file) from that in which you include
NDIS.H. Annoying? Yes. But it’s the only way to the best of my knowledge.

Peter
OSR


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> Include NTDDK.H in a separate module (file) from that in which you include

NDIS.H. Annoying? Yes. But it’s the only way to the best of my knowledge.

Would doing this be kosher as far as the WHQL process is concerned? I’m
very interested in doing something like this, but my driver will need to be
redmond apporved.

Thanks

Doug McLetchie
xxxxx@yahoo.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> ----------

From: xxxxx@yahoo.com[SMTP:xxxxx@yahoo.com]
Reply To: NT Developers Interest List
Sent: Tuesday, June 12, 2001 10:44 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Using NT Kernel Function in NDIS Driver

> Include NTDDK.H in a separate module (file) from that in which you
include
> NDIS.H. Annoying? Yes. But it’s the only way to the best of my
knowledge.

Would doing this be kosher as far as the WHQL process is concerned? I’m
very interested in doing something like this, but my driver will need to
be
redmond apporved.

Probably only if you use limited set of WDM functions. It would be better to
#define NDIS_WDM 1 before including ndis.h, read previous mails in this
thread, Thomas Divine described this solution.

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com