Re: A question about prohibited kernel-mode routines for NDIS driver

Do understand that NdisMRegisterDevice is a function that is called
specifically by NDIS MINIPORT drivers (hence the ‘M’). It also REQUIRES
a NdisWrapperHandle fetched by a call to NdisMInitializeWrapper - another
function used exclusively by NDIS miniports.

Of course, NdisMxyz functions are also used by the miniport-edge of NDIS
Intermediate (IM) drivers.

HOWEVER, a NDIS protocol (such as NDISUIO) is NOT a miniport and it does
not have a miniport edge. Hence it CANNOT use NdisMRegisterDevice or and
NdisMxyz functions.

A NDIS protocol driver must use NT kernel services, such as
IoCreateDevice/IoCreateSymbolicLink, to register as a Win32-visible device.

Hope this helps,

Thomas F. Divine

“Chen, Jian-Rong” <jian-rong.chen> wrote in message
news:xxxxx@ntdev…
>
>
> It is true that the mentioned section is under the title
> of NDIS-WDM driver prohibitation. However the text itself
> suggests that the limitation is because that these two functions
> could interfere with the NDIS support of PnP. Also the reference
> page of “NdisMRegisterDevice” has the comments that NDIS driver
> “should never” call IoCreateDevice() and IoCreateSymbolicLink().
> But apparently these two functions work fine in the NDISUIO
> example. Does the documentation implies that this could
> fail in future release of NDIS?
>
> Jian-Rong Chen
>
> -----Original Message-----
>
From: Thomas F. Divine [mailto:xxxxx@hotmail.com]
> Sent: Monday, October 27, 2003 1:27 PM
>
To: Windows System Software Devs Interest List
> Subject: [ntdev] Re: A question about prohibited kernel-mode routines
>for NDIS driver
>
>

> Humm…
>

> The admonition that you mentioned applies to NDIS-WDM
>
drivers. These are
> miniport drivers that have a NDIS MP “upper-edge” and use
>
WDM functions at
> the “lower-edge”.
>

> NDISUIO is NOT a NDIS-WDM driver. It is a NDIS protocol driver. The
>
NDS_-WDM limitation does not reply.
>
>
Thomas F. Divine
> www.ndis.com
>

>
>
“Chen, Jian-Rong” <jian-rong.chen> wrote in message
> news:xxxxx@ntdev…
>
>
> > Hi,
>
>
> > The Microsoft DDK documentation has a section of "Prohibited
>
> Kernel-Mode Routines for NDIS-WDM Drivers", which has listed
> > two functions, IoCreateDevice() and IoCreateSymbolicLink().
>
> However in the sample code file
> \src\network\ndis\ndisuio\sys\ntdisp.c,
>
> both prohibited functions are used to create a device object.
> >
>
> Is the DDK documentation is out of date or the sample code is
> > out of date?
>
>
> > regards
>
>
> > Jian-Rong Chen
>
>
>
>

>
>

> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: Jian-Rong.Chen@eu.sony.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
*******************************************************************

> The information contained in this message or any of its attachments may be
confidential and is intended for the exclusive use of the addressee(s). Any
disclosure, reproduction, distribution or other dissemination or use of this
communication is strictly prohibited without the express permission of the
sender. The views expressed in this email are those of the individual and
not necessarily those of Sony or Sony affiliated companies. Sony email is
for business use only.
>
> This email and any response may be monitored by Sony United Kingdom
Limited.
> (04)
>
*********************************************************
*******************
>
>
></jian-rong.chen></jian-rong.chen>