Halting a Miniport Adapter
NDIS calls an NDIS miniport driver's MiniportHaltEx function to deallocate resources when an adapter is removed from the system, and to stop the hardware. NDIS can call MiniportHaltEx after the driver's MiniportInitializeEx function returns successfully. For more information about MiniportInitializeEx, see Initializing a Miniport Adapter.
MiniportHaltEx must free any resources that the driver allocated for a device. The driver must call the reciprocals of the Ndis*Xxx* functions with which it originally allocated the resources. As a general rule, a MiniportHaltEx function should call the reciprocal Ndis*Xxx* functions in the reverse order used during initialization.
NDIS does not call MiniportHaltEx if there are outstanding OID requests or send requests. NDIS submits no further requests for the affected device after NDIS calls MiniportHaltEx.
After MiniportHaltEx returns, the miniport driver is in the Halted state.