Share via


ProtocolOpenAdapterComplete

ProtocolOpenAdapterComplete is a required driver function that completes processing of a binding operation for which NdisOpenAdapter returned NDIS_STATUS_PENDING.

VOID
ProtocolOpenAdapterComplete(
IN NDIS_HANDLE ProtocolBindingContext,
IN NDIS_STATUS Status,
IN NDIS_STATUS OpenErrorStatus );

Parameters

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

  • Status
    Specifies the final status of the network adapter driver open operation, either NDIS_STATUS_SUCCESS if the binding was established or an error status determined by the underlying driver.

    The underlying network adapter driver returns NDIS_STATUS_ADAPTER_NOT_READY for any requests it receives while the open operation is pending. After ProtocolOpenAdapterComplete returns control, the underlying driver cannot return this status.

  • OpenErrorStatus
    Specifies additional information about the reason for a failure if the value at Status is not NDIS_STATUS_SUCCESS and if the underlying driver supplied this information. For example, the driver of a Token Ring network adapter might return a ring error that NDIS forwards to ProtocolOpenAdapterComplete. This parameter can be NULL.

Comments

When NdisOpenAdapter returns NDIS_STATUS_PENDING to the ProtocolBindAdapter function of an NDIS protocol driver, NDIS calls that driver's ProtocolOpenAdapterComplete function when the asynchronous binding operation is complete.

If the input Status is NDIS_STATUS_SUCCESS, ProtocolOpenAdapterComplete carries out whatever driver-determined per-binding operations its ProtocolBindAdapter function would have done in a synchronous binding operation. Next, ProtocolOpenAdapterComplete calls NdisCompleteBindAdapter with NDIS_STATUS_SUCCESS for the Status and OpenStatus arguments and with the BindContext handle stored at ProtocolBindingContext by the ProtocolBindAdapter function. Then, ProtocolOpenAdapterComplete returns control.

Otherwise, ProtocolOpenAdapterComplete cleans up any per-binding state already set up by ProtocolBindAdapter. After releasing any state set up by ProtocolBindAdapter except for the BindContext handle, it calls NdisCompleteBindAdapter with an appropriate error for Status and the handle before it returns control.

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

NdisFreeMemory, NdisOpenAdapter, ProtocolBindAdapter

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.