Registering as an NDIS Intermediate 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.
An NDIS intermediate driver must register its MiniportXxx functions and its ProtocolXxx functions with NDIS in the context of its DriverEntryfunction. To register its MiniportXxx functions, an intermediate driver must call NdisIMRegisterLayeredMiniport. This call exports the intermediate driver's MiniportXxx functions. Note that the intermediate driver controls when its virtual miniports are initialized, and thus, when the driver is ready to accept sends and requests on a NIC.
NDIS calls the intermediate driver's MiniportInitializefunction after the Plug and Play (PnP) manager has started the virtual miniport device and after the intermediate driver has called NdisIMInitializeDeviceInstanceExfor that device. The call to MiniportInitializecan happen at a later time and therefore is not necessarily within the context of the call to NdisIMInitialzieDeviceInstanceEx. If the intermediate driver exports more than one virtual miniport, the driver must call NdisIMInitializeDeviceInstanceExfor each NIC that it makes available for network requests. To register its ProtocolXxx functions, an intermediate driver must call NdisRegisterProtocol.