The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Protocol Driver's DriverEntry and Initialization (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

A protocol driver's initial required entry point must be explicitly named DriverEntryso that the loader can identify it. All other exported functions, described here as ProtocolXxx, can have any developer-specified name since they are passed as addresses to NDIS. The definition of DriverEntryis the same as for any kernel-mode driver. For additional information about ProtocolXxx functions and DriverEntry, see DriverEntry of NDIS protocol drivers.

If the protocol driver exports a set of standard kernel-mode driver routines, such as any (Tdi)DispatchXxx and Unloadroutines, in addition to the NDIS-defined ProtocolXxx functions, the protocol driver must set the entry points of its standard routines in the DriverObjectpassed to DriverEntry, like any other kernel-mode intermediate driver.

Note   A kernel-mode intermediate driver is not the same as an NDIS intermediate driver. For more information about types of kernel-mode drivers, see Types of Windows Drivers.

A protocol driver's DriverEntryfunction must call NdisRegisterProtocolto register as an NDIS protocol driver (see Registering as an NDIS Protocol Driver).

DriverEntrycan initialize spin locks to protect any globally-shared resources that the protocol driver allocates, such as state variables, structures, and memory areas. The driver uses these resources to track connections and sends in progress or driver-allocated queues.

If DriverEntryfails to allocate any resources that the protocol driver requires to operate, the driver should release any previously-allocated resources. The protocol driver calls NdisDeregisterProtocol, if necessary, and returns an appropriate error status.

The following topics provide additional information about NDIS protocol driver initialization:

Registering as an NDIS Protocol Driver

Registering as a Call Manager or a Connection-Oriented Client



Send comments about this topic to Microsoft