NdisIMGetBindingContext function (ndis.h)

The NdisIMGetBindingContext function allows an NDIS protocol driver to access the device context area, which was created by an underlying intermediate driver, for a virtual miniport to which the higher level protocol driver is bound.

Syntax

NDIS_HANDLE NdisIMGetBindingContext(
  [in] NDIS_HANDLE NdisBindingHandle
);

Parameters

[in] NdisBindingHandle

The binding handle that the NdisOpenAdapterEx function returned at the NdisBindingHandle parameter that identifies the virtual miniport of the next lower intermediate driver to which the caller is bound.

Return value

NdisIMGetBindingContext returns a handle to the device context area for the given virtual miniport, or it returns NULL if no such context area exists.

Remarks

A protocol driver or intermediate driver can call NdisIMGetBindingContext from its ProtocolBindAdapterEx function to access the device context for a virtual miniport to which it is bound. The device context provides a common context area for all overlying protocol drivers that are bound to the same underlying intermediate driver.

Such a device context area was allocated and defined by the lower level NDIS intermediate driver and passed to NDIS in a call to the NdisIMInitializeDeviceInstanceEx function.

All protocol drivers that call NdisIMGetBindingContext can safely assume that the underlying intermediate driver allocated its context area from nonpaged pool. They should treat the returned context area as read-only, preserving the state set up by the underlying NDIS intermediate driver that defined it.

Requirements

Requirement Value
Minimum supported client Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisIMGetBindingContext (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisIMGetBindingContext (NDIS 5.1)) in Windows XP.
Target Platform Desktop
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL < DISPATCH_LEVEL
DDI compliance rules Irql_IM_Function(ndis)

See also

NdisIMInitializeDeviceInstanceEx

NdisOpenAdapterEx

ProtocolBindAdapterEx