Initializing the NDIS Library and Registering the Miniport Driver (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.
When a miniport driver is loaded, the operating system creates a driver object for the miniport driver and calls the DriverEntryfunction of that driver. Within the context of its DriverEntryfunction, the miniport driver calls:
NdisMInitializeWrapper, with the address of the driver object and the associated registry path to the driver-specific information
NdisMRegisterMiniport, to register itself with NDIS, indicating which NDIS version it is compatible with and supplying the entry points of its upper-edge ( MiniportXxx) functions. The NDIS Library saves these entry points for use in subsequent calls to the miniport driver.
If the call to NdisMRegisterMiniportor NdisIMRegisterLayeredMiniportdoes not return NDIS_STATUS_SUCCESS:
DriverEntry returns the value returned by NdisMRegisterMiniport or NdisIMRegisterLayeredMiniport.
DriverEntry calls NdisTerminateWrapper, which causes NDIS to clean up the resources it allocated when the miniport driver called NdisMInitializeWrapper.
For a detailed description of the DriverEntryfunction, see NDIS Miniport Driver DriverEntry Function.