次の方法で共有


Shutdown Handler (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.

A miniport driver should register a shutdown handler during initialization. The definition of the MiniportShutdownhandler is:

VOID
 MiniportShutdown(
 IN PVOID  ShutdownContext
 );

A driver's shutdown handler should only:

  • Ensure that the hardware is not trying to copy any data to memory after returning from the shutdown handler. That is, if there is a direct memory access (DMA) operation in progress, the operation should be terminated.

  • Reset the NIC hardware to its initial state.

The shutdown handler can be called as a result of a user operation, in which case it runs at IRQL = PASSIVE_LEVEL. It can also be called as a result of an unrecoverable system error. If so, MiniportShutdowncan be running at any IRQL. MiniportShutdownshould call no NdisXxx functions.

Unlike MiniportHalt, MiniportShutdownshould not release any allocated resources. MiniportShutdownshould just stop the NIC.

 

 

Send comments about this topic to Microsoft