Freigeben über


CLOSE_ADAPTER_COMPLETE_HANDLER callback 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.

The ProtocolCloseAdapterComplete function is a required driver function that completes processing for an unbinding operation for which NdisCloseAdapter returned NDIS_STATUS_PENDING.

Syntax

CLOSE_ADAPTER_COMPLETE_HANDLER ProtocolCloseAdapterComplete;

VOID ProtocolCloseAdapterComplete(
  _In_ NDIS_HANDLE ProtocolBindingContext,
  _In_ NDIS_STATUS Status
)
{ ... }

Parameters

  • ProtocolBindingContext [in]
    Specifies the handle to a protocol-allocated context area in which the protocol driver maintains per-binding run-time state. The driver supplied this handle when it called NdisOpenAdapter.

  • Status [in]
    Indicates the final status of the close operation in the underlying driver.

Return value

None

Remarks

NDIS delays calling ProtocolCloseAdapterComplete until every request pending on the binding has completed. When ProtocolCloseAdapterComplete is called, the NdisBindingHandle originally returned by NdisOpenAdapter is no longer valid. ProtocolCloseAdapterComplete cannot call any NdisXxx function that requires this handle as a parameter.

ProtocolCloseAdapterComplete releases all resources the driver allocated for per-binding network I/O operations before it returns control.

ProtocolCloseAdapterComplete must call NdisCompleteUnbindAdapter with the UnbindContext handle saved in the ProtocolBindingContext area by ProtocolUnbindAdapter. Consequently, ProtocolCloseAdapterComplete should not release the driver-allocated context area until it has called NdisCompleteUnbindAdapter.

Requirements

Target platform

Desktop

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use ProtocolCloseAdapterCompleteExinstead. Supported for NDIS 5.1 drivers in Windows Vista and Microsoft Windows XP

Header

Ndis.h (include Ndis.h)

IRQL

PASSIVE_LEVEL

See also

NdisCloseAdapter

NdisCompleteUnbindAdapter

NdisDeleteNPagedLookasideList

NdisFreeBufferPool

NdisFreeMemory

NdisFreePacketPool

NdisOpenAdapter

ProtocolUnbindAdapter

 

 

Send comments about this topic to Microsoft