次の方法で共有


ProtocolCloseAdapterCompleteEx (Compact 2013)

3/26/2014

NDIS calls a protocol driver's ProtocolCloseAdapterCompleteEx function to complete a close adapter operation for which the NdisCloseAdapterEx function returned NDIS_STATUS_PENDING.

Syntax

VOID
  ProtocolCloseAdapterCompleteEx(
    IN NDIS_HANDLE  ProtocolBindingContext,
   );

Parameters

  • ProtocolBindingContext
    A handle to a context area allocated by the protocol driver. The protocol driver maintains the per-binding context information in this context area. The driver supplied this handle to NDIS when the driver called the NdisOpenAdapterEx function.

Return Value

None

Remarks

ProtocolCloseAdapterCompleteEx is a required function.

If ProtocolUnbindAdapterEx is waiting for NDIS to call ProtocolCloseAdapterCompleteEx, this function can indicate that it has been called and return (for example, it updates the ProtocolBindingContext context area). This allows the ProtocolCloseAdapterCompleteEx function to complete the unbind operation.

After the protocol driver calls the NdisCloseAdapterEx function, the NdisBindingHandle handle that the NdisOpenAdapterEx function returned is no longer valid. Therefore, ProtocolCloseAdapterCompleteEx cannot call any NdisXxx functions that require this handle as a parameter.

If the ProtocolUnbindAdapterEx function has not already done this, ProtocolCloseAdapterCompleteEx can release the resources that the protocol driver allocated for per-binding network I/O operations.

If ProtocolUnbindAdapterEx returned NDIS_STATUS_PENDING and saved the UnbindContext handle in the context area at ProtocolBindingContext, ProtocolCloseAdapterCompleteEx can call the NdisCompleteUnbindAdapterEx function to complete the unbinding operation. Therefore, ProtocolCloseAdapterCompleteEx should not release the context area until after it calls NdisCompleteUnbindAdapterEx.

NDIS calls ProtocolCloseAdapterCompleteEx at IRQL = PASSIVE_LEVEL.

See Also

Reference

NDIS Protocol Driver Functions
NdisCloseAdapterEx
NdisCompleteUnbindAdapterEx
NdisOpenAdapterEx
ProtocolUnbindAdapterEx