Microsoft Windows CE 3.0  

NdisIMGetDeviceContext

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.

NdisIMGetDeviceContextallows an NDIS intermediate driver's MiniportInitializefunction to access the device context area allocated by its ProtocolBindAdapter function.

NDIS_HANDLE NdisIMGetDeviceContext(
IN NDIS_HANDLE
MiniportAdapterHandle
);

Parameters

MiniportAdapterHandle
Specifies the handle input to MiniportInitialize.

Return Values

NdisIMGetDeviceContextreturns access to the device context area for the virtual network adapter identified by MiniportAdapterHandle, or it returns NULL if the driver's ProtocolBindAdapter function did not allocate such a device context area.

Remarks

An NDIS intermediate driver's MiniportInitializefunction calls NdisIMGetDeviceContextto access the device context area for the virtual network adapter it is initializing. Usually, the memory for such an area is provided by the intermediate driver's ProtocolBindAdapterfunction, which calls NdisIMInitializeDeviceInstanceExwith a pointer to this area, thereby causing the driver's MiniportInitializefunction to be called. However, an intermediate driver is not required to have such a context area.

On return from NdisIMGetDeviceContext, MiniportInitializesets up the driver-defined state for the virtual network adapter with whatever information the intermediate driver writer intends to be useful to still higher level protocols that bind themselves subsequently to its virtual network adapter.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 3.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

MiniportInitialize, NdisIMInitializeDeviceInstanceEx, ProtocolBindAdapter