Share via


Migrate Adapter Halt Functionality to NDIS 6.0 (Compact 2013)

3/26/2014

In NDIS 6.0, the MiniportHaltEx driver entry point function replaces the NDIS 5.xMiniportHalt function. MiniportHaltEx has a HaltAction parameter in addition to the MiniportAdapterContext parameter. The HaltAction parameter specifies the reason for halting the miniport adapter. NDIS calls your miniport driver's MiniportHaltEx function to stop the hardware and to deallocate resources when an adapter is removed from the system. NDIS can call MiniportHaltEx after the driver's MiniportInitializeEx function returns successfully. For more information about MiniportInitializeEx, see Modify Adapter Initialization Functionality for NDIS 6.0.

The following table shows which API elements have been renamed and/or changed for NDIS 6.0.

NDIS 5.x

NDIS 6.0

MiniportHalt

MiniportHaltEx

If the network adapter generates interrupts, your miniport driver's MiniportHaltEx function can be preempted by your driver's MiniportInterrupt function until MiniportHaltEx disables interrupts. NDIS does not call MiniportHaltEx if there are outstanding object identifier (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.

If MiniportInitializeEx returns NDIS_STATUS_SUCCESS, your driver should release all the resources for the adapter in its MiniportHaltEx function. If MiniportInitializeEx fails, MiniportInitializeEx must release all allocated resources before it returns and before the adapter returns to the Halted state.

For information about miniport adapter states, see Adapter States of a Miniport Driver.

See Also

Concepts

Update Miniport Adapter Initialization, Halt, and Shutdown Functionality for NDIS 6.0