다음을 통해 공유


NdisIMGetBindingContext (Windows Embedded CE 6.0)

1/6/2010

This function allows an NDIS protocol to access the device context area, created by an underlying intermediate driver, for a virtual NIC to which the higher-level protocol is bound.

Syntax

NDIS_HANDLE NdisIMGetBindingContext(
  NDIS_HANDLE NdisBindingHandle
);

Parameters

  • NdisBindingHandle
    [in] Specifies the handle returned by NdisOpenAdapter. This handle identifies the virtual NIC of the next lower intermediate driver to which the caller is bound.

Return Value

The following table shows the return values for NdisIMGetBindingContext.

Value Description

NDISIMGETBINDINGCONTEXT

Returns access to the device context area for the given virtual NIC.

NULL

Returns if no device context area exists for the given virtual NIC.

Remarks

A highest level NDIS protocol driver or intermediate protocol can call NdisIMGetBindingContext from its ProtocolBindAdapter function to access the device context for a virtual NIC to which it is bound. The device context provides a common context area for all higher-level protocols 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 NdisIMInitializeDeviceInstanceEx. This intermediate driver's MiniportInitialize function calls NdisIMGetDeviceContext to gain access this device context area if it was allocated by the intermediate driver's ProtocolBindAdapter function.

All protocols that call NdisIMGetBindingContext should treat the returned context area as read-only, preserving the state set up by the underlying NDIS intermediate driver that defined it.

Requirements

Header ndis.h
Library ndis.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
NdisOpenAdapter
MiniportInitialize
ProtocolBindAdapter
NdisIMInitializeDeviceInstanceEx
NdisIMGetDeviceContext