Table of contents
Collapse the table of content
Expand the table of content

Miniport Driver Halt Handler

Last Updated: 9/2/2016

An NDIS miniport driver must supply a MiniportHaltEx function to NdisMRegisterMiniportDriver.

MiniportHaltEx should undo everything that MiniportInitializeEx did. For example, the NDIS miniport driver might:

The following diagram illustrates unloading a miniport driver.

diagram illustrating unloading a miniport driver

MiniportHaltEx should complete the operations that are necessary to unload the driver before returning. If the miniport driver has any outstanding receive indications (that is, received network data that it has indicated up to NDIS but which NDIS has not yet returned), MiniportHaltEx must not return until such data is returned to the miniport driver's MiniportReturnNetBufferLists function.

The preceding figure shows a set of calls that could be made by a MiniportHaltEx function. These calls are only a subset of the calls that could be made. The actual set of calls depends on previous actions of the miniport driver. The miniport driver can make these same calls in MiniportInitializeEx if it cannot successfully initialize the network adapter because of hardware problems or because it cannot acquire a resource that it needs. In such a case, MiniportInitializeEx should unload the driver by undoing its previous actions. Otherwise, MiniportHaltEx will undo the actions of MiniportInitializeEx.

The following list describes the calls that are required to reverse certain actions that the miniport driver might take:

Adapter States of a Miniport Driver

Freeing an NDIS Port

Halting a Miniport Adapter

Miniport Adapter States and Operations

Miniport Driver Reset and Halt Functions

© 2016 Microsoft