MiniportShutdown (Compact 2013)
3/26/2014
This is an optional function that restores a NETWORK ADAPTER to its initial state when the system is shut down, whether by the user or because an unrecoverable system error occurred.
Syntax
VOID MiniportShutdown(
PVOID ShutdownContext
);
Parameters
- ShutdownContext
[in] Points to a context area supplied when the NETWORK ADAPTER driver's MiniportInitialize function called NdisMRegisterAdapterShutdownHandler. Usually, this input parameter is the NETWORK ADAPTER-specific MiniportAdapterContext pointer that is passed to other MiniportXxx functions.
Remarks
Every NETWORK ADAPTER driver should have a MiniportShutdown function. MiniportShutdown does nothing more than restore the NETWORK ADAPTER to its initial state (before the miniport's DriverEntry function runs). However, this ensures that the NETWORK ADAPTER is in a known state and ready to be reinitialized when the machine is restarted after a system shutdown occurs for any reason, including a crash dump.
A NETWORK ADAPTER driver's MiniportInitialize function must call NdisMRegisterAdapterShutdownHandler to set up a MiniportShutdown function. The driver's MiniportHalt function must make a reciprocal call to NdisMDeregisterAdapterShutdownHandler.
If MiniportShutdown is called because of a user-initiated system shutdown, it runs at IRQL PASSIVE_LEVEL in a system-thread context. If it is called because of an unrecoverable error, MiniportShutdown runs at an arbitrary IRQL and in the context of whatever component raised the error. For example, MiniportShutdown might be run at high DIRQL in the context of an ISR for a device essential to continued execution of the system.
MiniportShutdown should call no NdisXXX functions.
Requirements
Header |
externs.h |
See Also
Reference
NDIS 5.x Legacy Functions
DriverEntry
MiniportHalt
MiniportInitialize
NdisMDeregisterAdapterShutdownHandler
NdisMRegisterAdapterShutdownHandler
NDIS 5.x Legacy Reference