WdfObjectContextGetObject method

[Applies to KMDF and UMDF]

The WdfObjectContextGetObject method returns a handle to the framework object that a specified context space belongs to.

Syntax


WDFOBJECT WdfObjectContextGetObject(
  [in]  PVOID ContextPointer
);

Parameters

ContextPointer [in]

A pointer to object context space. The driver can obtain this pointer by calling WdfObjectGetTypedContext.

Return value

WdfObjectContextGetObject returns a handle to a framework object.

Remarks

For more information about object context space, see Framework Object Context Space.

Examples

The following code example obtains a handle to the framework object that a specified context space belongs to.


WDFDEVICE  device;

device = WdfObjectContextGetObject(DeviceContext);

Requirements

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdfobject.h (include Wdf.h)

Library

Wdf01000.sys (KMDF);
WUDFx02000.dll (UMDF)

IRQL

Any level

DDI compliance rules

DriverCreate

See also

WdfObjectGetTypedContext

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft