NdisMRegisterAdapterShutdownHandler function

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.

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

Syntax

VOID NdisMRegisterAdapterShutdownHandler(
  _In_ NDIS_HANDLE              MiniportHandle,
  _In_ PVOID                    ShutdownContext,
  _In_ ADAPTER_SHUTDOWN_HANDLER ShutdownHandler
);

Parameters

  • MiniportHandle [in]
    Specifies the handle input to MiniportInitialize.

  • ShutdownContext [in]
    Pointer to a driver-determined context area. This pointer will be passed to the function at ShutdownHandler when it is called.

  • ShutdownHandler [in]
    Specifies the entry point of the caller's MiniportShutdown function.

Return value

None

Remarks

NDIS 5.0 miniport drivers and intermediate drivers can optionally register a MiniportShutdown function by calling NdisMRegisterAdapterShutdownHandler. NDIS 5.1 miniport drivers and intermediate drivers must register a MiniportShutdown function by calling NdisMRegisterMiniport or NdisIMRegisterLayeredMiniport, respectively.

Whenever an NDIS 5.0 miniport driver's or intermediate driver's MiniportInitialize function successfully initializes a NIC, it calls NdisMRegisterAdapterShutdownHandler, usually just before MiniportInitialize returns NDIS_STATUS_SUCCESS.

Every NDIS 5.0 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.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisMRegisterMiniportDriverinstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP. Use NdisMRegisterMiniportinstead.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

PASSIVE_LEVEL

See also

MiniportInitialize

MiniportShutdown

NdisMDeregisterAdapterShutdownHandler

NdisMRegisterMiniport

NdisIMRegisterLayeredMiniport

 

 

Send comments about this topic to Microsoft