NDIS Miniport Driver DriverEntry Function (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.

Every miniport driver must provide a function called DriverEntry. DriverEntry is called by the system to load the driver. DriverEntry creates an association between the miniport driver and the NDIS Library, and registers the miniport driver's version number and entry points with NDIS, as illustrated in the following figure.

Initializing NDIS Library and Registering a Miniport Driver

The declaration of the DriverEntryfunction is:

NTSTATUS
 DriverEntry(
 IN PDRIVER_OBJECT  DriverObject,
  IN PUNICODE_STRING RegistryPath
 );

Two arguments are passed to DriverEntry:

  • A pointer to the driver object, which was created by the I/O system.

  • A pointer to the registry path, which specifies where driver-specific parameters are stored.

As shown in the preceding figure, DriverEntry calls NdisMInitializeWrapper and then NdisMRegisterMiniport. DriverEntry passes both input pointers to NdisMInitializeWrapper, which returns a wrapper handle. DriverEntry passes the wrapper handle to NdisMRegisterMiniport.

 

 

Send comments about this topic to Microsoft