Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
ProtocolUnbindAdapteris a required function to support Plug and Play.
VOID ProtocolUnbindAdapter( OUT PNDIS_STATUS Status, IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE UnbindContext );
Parameters
Comments
As the reciprocal of ProtocolBindAdapter, ProtocolUnbindAdapterreleases all resources the driver allocated for per-binding network I/O operations with one possible exception: the driver-allocated context area designated by the ProtocolBindingContexthandle.
ProtocolUnbindAdaptermust call NdisCloseAdapter, which can, in turn, call the driver's ProtocolCloseAdapterCompletefunction with the ProtocolBindingContexthandle, so ProtocolUnbindAdaptercannot free the memory at ProtocolBindingContextunless NdisCloseAdapterreturns NDIS_STATUS_SUCCESS.
Consequently, ProtocolUnbindAdaptershould store the input UnbindContexthandle in the area at ProtocolBindingContextbefore it calls NdisCloseAdapter. If this call is completed asynchronously, the ProtocolCloseAdapterCompletefunction will free all driver-allocated per-binding resources and call NdisCompleteUnbindAdapterwith the UnbindContexthandle.
If NdisCloseAdapterreturns NDIS_STATUS_SUCCESS, ProtocolUnbindAdapterfrees all per-binding resources, including the driver-allocated memory at ProtocolBindingContext, and calls NdisCompleteUnbindAdapteritself.
The ProtocolUnbindAdapterfunction of an NDIS intermediate driver makes a reciprocal call to NdisIMDeinitializeDeviceInstance. Such a driver's MiniportHaltfunction must release all driver-allocated resources associated with the intermediate driver's network adapter before its virtual network adapter is removed from the system.
As soon as ProtocolUnbindAdaptercalls NdisCloseAdapter, the NdisBindingHandleoriginally returned by NdisOpenAdaptershould be considered invalid. ProtocolUnbindAdaptercannot make any subsequent calls to Ndis XXXfunctions with this handle, and the protocol cannot receive any indications from the underlying driver. However, if the underlying network adapter is being removed to be reconfigured, NDIS will call the driver's ProtocolBindAdapterfunction to re-establish the binding when the network adapter is available again.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.0 and later | Ndis.h | Ndislib.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
NdisCloseAdapter, NdisIMDeinitializeDeviceInstance, MiniportHalt, NdisOpenAdapter, NdisCloseAdapter, ProtocolBindAdapter, ProtocolCloseAdapterComplete