Skip to content

Latest commit

 

History

History
223 lines (178 loc) · 6.3 KB

nf-ndis-ndisopenadapterex.md

File metadata and controls

223 lines (178 loc) · 6.3 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:ndis.NdisOpenAdapterEx
NdisOpenAdapterEx function (ndis.h)
A protocol driver calls the NdisOpenAdapterEx function from its ProtocolBindAdapterEx function to set up a binding between the protocol driver and an underlying driver.
netvista\ndisopenadapterex.htm
netvista
05/02/2018
NdisOpenAdapterEx function
NdisOpenAdapterEx, NdisOpenAdapterEx function [Network Drivers Starting with Windows Vista], ndis/NdisOpenAdapterEx, netvista.ndisopenadapterex, protocol_ndis_functions_ref_7ea04244-bfbb-460d-86f3-35e908850c6a.xml
ndis.h
Ndis.h
Desktop
Supported in NDIS 6.0 and later.
Irql_Protocol_Driver_Function
Ndis.lib
PASSIVE_LEVEL
Windows
NdisOpenAdapterEx
ndis/NdisOpenAdapterEx
APIRef
kbSyntax
LibDef
ndis.lib
ndis.dll
NdisOpenAdapterEx

NdisOpenAdapterEx function

-description

A protocol driver calls the NdisOpenAdapterEx function from its ProtocolBindAdapterEx function to set up a binding between the protocol driver and an underlying driver.

-parameters

-param NdisProtocolHandle [in]

The handle returned by the NdisRegisterProtocolDriver function.

-param ProtocolBindingContext [in]

The handle for a caller-supplied context area in which the protocol driver maintains state information for this binding.

-param OpenParameters [in]

A pointer to an NDIS_OPEN_PARAMETERS structure that is set up by the caller.

-param BindContext [in]

The handle that identifies the NDIS context area for the bind operation. NDIS passed this handle to the BindContext parameter of the ProtocolBindAdapterEx function.

-param NdisBindingHandle [out]

A pointer to a caller-supplied variable. NDIS writes a handle at NdisBindingHandle that identifies the binding between the caller and the miniport adapter specified in the AdapterName member at OpenParameters . The caller uses this handle in subsequent calls to NdisXxx functions.

-returns

NdisOpenAdapterEx returns one of the following status values:

Return code Description
NDIS_STATUS_SUCCESS
NdisOpenAdapterEx successfully completed the open operation.
NDIS_STATUS_PENDING
NdisOpenAdapterEx did not complete the open operation. NDIS later calls the protocol driver's ProtocolOpenAdapterCompleteEx function to complete the open operation.
NDIS_STATUS_RESOURCES
NdisOpenAdapterEx failed due to insufficient resources.
NDIS_STATUS_ADAPTER_NOT_FOUND
NdisOpenAdapterEx failed because a miniport adapter specified in the AdapterName member at OpenParameters could not be found.
NDIS_STATUS_UNSUPPORTED_MEDIA
NdisOpenAdapterEx failed because the array specified in the MediumArray member at OpenParameters did not include a medium type that NDIS or the underlying driver supports.
NDIS_STATUS_FAILURE
NdisOpenAdapterEx failed for reasons other than those in the preceding list.

-remarks

A protocol driver must call NdisOpenAdapterEx from its ProtocolBindAdapterEx function. NDIS fails any attempt to call NdisOpenAdapterEx outside the context of ProtocolBindAdapterEx.

If NdisOpenAdapterEx returns NDIS_STATUS_PENDING, the caller must not use the values at NdisBindingHandle and the SelectedMediumIndex member at OpenParameters until NDIS calls the ProtocolOpenAdapterCompleteEx function.

The string at AdapterName must remain valid only until NdisOpenAdapterEx returns. Therefore, in the case that NdisOpenAdapterEx returns NDIS_STATUS_PENDING, the driver is not required to continue to retain this string after NdisOpenAdapterEx returns.

After the open operation completes successfully, the caller can use the value that NDIS returned in the NdisBindingHandle in subsequent calls to NdisXxx functions. The caller can use the SelectedMediumIndex member of the OpenParameters parameter to determine how it should interact with the underlying driver.

-see-also

NDIS_OPEN_PARAMETERS

NdisRegisterProtocolDriver

ProtocolBindAdapterEx

ProtocolOpenAdapterCompleteEx