Registering as an NDIS Intermediate Driver

An NDIS intermediate driver must register its MiniportXxx functions and its ProtocolXxx functions with NDIS in the context of its DriverEntry function. To register its MiniportXxx functions, an intermediate driver must call NdisMRegisterMiniportDriver with the NDIS_INTERMEDIATE_DRIVER flag set. This flag is in the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure that the driver passes at MiniportDriverCharacteristics . This call exports the intermediate driver's MiniportXxx functions. For more information about registering MiniportXxx functions, see Registering an Intermediate Driver as a Miniport Driver.

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 an adapter. NDIS calls the intermediate driver's MiniportInitializeEx function after the Plug and Play (PnP) manager has started the virtual miniport device and after the intermediate driver has called NdisIMInitializeDeviceInstanceEx for that device. The call to MiniportInitializeEx can happen at a later time and therefore is not necessarily within the context of the call to NdisIMInitializeDeviceInstanceEx. If the intermediate driver exports more than one virtual miniport, the driver must call NdisIMInitializeDeviceInstanceEx for each virtual miniport that it makes available for network requests.

To register its ProtocolXxx functions, an intermediate driver must call the NdisRegisterProtocolDriver function. For more information about registering ProtocolXxx functions, see Registering an Intermediate Driver as a Protocol Driver.