Hardware Dev Center

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 NdisXxx functions with which it originally allocated the resources. As a general rule, a MiniportHaltEx function should call the reciprocal NdisXxx functions in the reverse order used during initialization.

If an adapter generates interrupts, a miniport driver's MiniportHaltEx function can be preempted by the driver's MiniportInterrupt function until MiniportHaltEx disables interrupts.

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.

Related topics

Adapter States of a Miniport Driver
Miniport Adapter States and Operations
Miniport Driver Halt Handler
Writing NDIS Miniport Drivers



Send comments about this topic to Microsoft

© 2015 Microsoft