Поделиться через


Halting a Miniport Driver (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NDIS halts a miniport driver by calling the miniport driver's MiniportHaltfunction. The MiniportHaltfunction releases system resources claimed by the miniport driver. For example, if the miniport driver's MiniportInitializefunction registered an interrupt with NdisMRegisterInterrupt, the miniport driver's MiniportHaltfunction must deregister the interrupt with NdisMDeregisterInterrupt.

If the miniport driver fails to initialize a NIC or to claim required system resources, its MiniportInitializefunction releases all miniport driver-allocated resources. Otherwise, the miniport driver releases its resources in the context of its MiniportHaltfunction.

If the miniport driver has any outstanding receive packets (packets that it has indicated up to NDIS but which NDIS has not yet returned), the miniport driver must not return from its MiniportHaltfunction until such packets are returned to the miniport driver's MiniportReturnPacketfunction.

If the driver has a MiniportTimerfunction associated with any timer object that might be in the system timer queue, MiniportHaltshould call NdisMCancelTimer. If a call to NdisMCancelTimerfails, the timer might have already fired. In this case, the miniport driver should wait for the timer handler to complete before returning from MiniportHalt.

Note that a miniport driver's MiniportShutdownfunction should not release any allocated resources. The MiniportShutdownfunction should stop any data transfers in progress and put the NIC in its initial state.

For more information about halting a miniport driver, see Halt Handler.

 

 

Send comments about this topic to Microsoft