Porting Intermediate Driver Unload Operations to NDIS 6.0

For NDIS 6.0, intermediate drivers must specify a MiniportDriverUnload function entry point in the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure. NDIS 6.0 drivers do not call the NdisMRegisterUnloadHandler function.

For NDIS 6.0, the ProtocolUnload function, which NDIS calls when an intermediate driver is uninstalled, is replaced by the ProtocolUninstall function. NDIS calls ProtocolUninstall when a user requests to uninstall an intermediate driver.

Before calling ProtocolUninstall, NDIS calls ProtocolUnbindAdapterEx once for each bound adapter. NDIS then calls ProtocolUninstall before the system actually unloads the driver. This timing provides a chance to release any device objects or other resources that might otherwise prevent the system from calling the intermediate driver's MiniportDriverUnload function and unloading the driver.

The MiniportDriverUnload and ProtocolUninstall functions are defined in the driver's NDIS_MINIPORT_DRIVER_CHARACTERISTICS and NDIS_PROTOCOL_DRIVER_CHARACTERISTICS structures.

Call NdisDeregisterProtocolDriver and NdisMDeregisterMiniportDriver from the MiniportDriverUnload function.

For more information about unloading the miniport upper edge of an intermediate driver, see Porting Miniport Driver Unload Operations to NDIS 6.0.

For more information about unloading the protocol lower edge of an intermediate driver, see Porting Protocol Driver Unload Operations to NDIS 6.0.

For more information about unloading an NDIS 6.0 intermediate driver, see Unloading an Intermediate Driver.

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft