Initializing NDIS library and registering a miniport
To initialize the NDIS library, the operating system must ensure that the configuration registry has appropriate information for each miniport. When a driver is loaded, the operating system uses the binding information in the registry, creates a driver object for each miniport driver, and calls the DriverEntry function of that driver. The miniport in turn calls NdisMInitializeWrapper, passing the address of the driver object and the associated registry path to the driver-specific information. NdisMInitializeWrapper can then perform its initialization chores.
After NdisMInitializeWrapper returns, the miniport calls NdisMRegisterMiniport to register itself as a driver on the network, passing in the addresses of its entry points. The NDIS library stores the addresses of the MiniportXxx functions that are supplied by the miniport in the driver object.
Before receiving and sending packets on the network, the NDIS library must register all network interface cards.