NdisMRegisterAdapterShutdownHandler

VOID
    NdisMRegisterAdapterShutdownHandler(

        IN NDIS_HANDLE MiniportHandle,
        IN PVOID ShutdownContext,
        IN ADAPTER_SHUTDOWN_HANDLER ShutdownHandler
        );

NdisMRegisterAdapterShutdownHandler registers a NIC-driver-supplied MiniportShutdown function to be called when the system is shutting down.

Parameters

MiniportHandle
Specifies the handle input to MiniportInitialize.
ShutdownContext
Points to a driver-determined context area. This pointer will be passed to the function at ShutdownHandler when it is called.
ShutdownHandler
Specifies the entry point of the caller’s MiniportShutdown function.

Comments

Whenever a MiniportInitialize function successfully initializes a NIC, it calls NdisMRegisterAdapterShutdownHandler, usually just before MiniportInitialize returns NDIS_STATUS_SUCCESS.

Every NIC driver should register a MiniportShutdown function when it initializes. MiniportShutdown is responsible for restoring the NIC to its initial state before the system is shut down.

Callers of NdisMRegisterAdapterShutdownHandler run at IRQL PASSIVE_LEVEL.

See Also

MiniportInitialize, MiniportShutdown, NdisMDeregisterAdapterShutdownHandler