NdisUnbindAdapter function (ndis.h)

Protocol drivers call the NdisUnbindAdapter function to request NDIS to close a binding to an underlying miniport adapter.

Syntax

NDIS_STATUS NdisUnbindAdapter(
  [in] NDIS_HANDLE NdisBindingHandle
);

Parameters

[in] NdisBindingHandle

A handle that the protocol driver obtained from a call to the NdisOpenAdapterEx function. The handle identifies the binding to close.

Return value

NdisUnbindAdapter returns one of the following status values:

Return code Description
NDIS_STATUS_SUCCESS
NdisUnbindAdapter successfully initiated the unbind operation.
NDIS_STATUS_RESOURCES
NdisUnbindAdapter failed due to insufficient resources.

Remarks

Protocol drivers call NdisUnbindAdapter outside the context of the ProtocolUnbindAdapterEx or ProtocolBindAdapterEx functions. NDIS schedules a work item to call the protocol driver's ProtocolUnbindAdapterEx function and returns immediately.

Before the call to NdisUnbindAdapter returns, NDIS can already have closed the binding. Therefore, after the call returns, the caller must not assume that the handle it passed to the NdisBindingHandle parameter is still valid.

Note  NDIS might not call ProtocolUnbindAdapterEx even if NdisUnbindAdapter returns NDIS_STATUS_SUCCESS.
 

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL <= DISPATCH_LEVEL
DDI compliance rules Irql_Protocol_Driver_Function(ndis)

See also

NdisOpenAdapterEx

ProtocolBindAdapterEx

ProtocolUnbindAdapterEx