A protocol driver calls the NdisCloseAdapterEx function to release the binding and the resources that were allocated when the driver called the NdisOpenAdapterEx function.
NDIS_STATUS NdisCloseAdapterEx( NDIS_HANDLE NdisBindingHandle );
The handle that NDIS provided at the NdisBindingHandle parameter of NdisOpenAdapterEx. This handle identifies the binding that NDIS should close.
NdisCloseAdapterEx returns one of the following status values:
||NdisCloseAdapterEx successfully closed the binding to the underlying miniport adapter.|
||NdisCloseAdapterEx did not complete the close operation and the operation will be completed asynchronously. NDIS calls the protocol driver's ProtocolCloseAdapterCompleteEx function when the operation is complete.|
A protocol driver typically calls NdisCloseAdapterEx from its ProtocolUnbindAdapterEx function. The driver can also call NdisCloseAdapterEx from its ProtocolBindAdapterEx function. For example, if the driver failed to set an OID value after it called NdisOpenAdapterEx, it can call NdisCloseAdapterEx from its ProtocolBindAdapterEx function.
If a protocol driver must close a miniport adapter outside the context of ProtocolUnbindAdapterEx or ProtocolBindAdapterEx, it must call the NdisUnbindAdapter function.
Protocol drivers should wait for all send requests and OID requests that they originated to complete before calling NdisCloseAdapterEx.
As soon as the driver calls NdisCloseAdapterEx, the handle obtained from the NdisOpenAdapterEx function at the NdisBindingHandle parameter becomes invalid.
|Minimum supported client||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_Protocol_Driver_Function|
Send feedback about: