3.7 Halt Handler
A miniport must supply a MiniportHalt function to NdisMRegisterMiniport.
The definition of MiniportHalt is:
VOID
MiniportHalt(
IN NDIS_HANDLE MiniportAdapterContext
);
MiniportHalt can be called:
-
If any request to set up multicast addresses, or to set MAC_OPTIONS, fails
-
If all the protocol drivers bound to the miniport unbind
-
During an unload operation; for instance, a NetStop command has caused an
unload operation to be carried out
-
During system shutdown
MiniportHalt should undo everything that MiniportInitialize did including the
following:
-
Free ports
-
Release all the hardware resources it claimed
-
Free interrupt resources by calling NdisMDeregisterInterrupt
-
Free any memory it has allocated
-
Terminate the wrapper
-
Stop the NIC, unless the MiniportShutdown function has already restored the
NIC to its initial state