Bewerken

Delen via


WdfObjectContextGetObject function (wdfobject.h)

[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

[in] ContextPointer

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.

For more information about the cleanup rules for a framework object hierarchy, see Framework Object Life Cycle.

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

Requirement Value
Target Platform Universal
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(kmdf)

See also

WdfObjectGetTypedContext