WdfTimerGetParentObject function (wdftimer.h)

[Applies to KMDF and UMDF]

The WdfTimerGetParentObject method returns a handle to the parent object of a specified framework timer object.

Syntax

WDFOBJECT WdfTimerGetParentObject(
  [in] WDFTIMER Timer
);

Parameters

[in] Timer

A handle to a framework timer object that was obtained by calling WdfTimerCreate.

Return value

WdfTimerGetParentObject returns a handle to the framework object that is the specified timer object's parent object.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

For more information about framework timer objects, see Using Timers.

Examples

The following code example shows now an EvtTimerFunc callback function can obtain a timer object's parent. In this example, the driver previously specified that the timer object's parent is a queue object.

VOID
MyEvtTimerFunc(
    IN WDFTIMER  Timer
    )
{
    WDFQUEUE queue;

    queue = WdfTimerGetParentObject(Timer);
...
}

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdftimer.h (include Wdf.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL <=DISPATCH_LEVEL
DDI compliance rules DriverCreate(kmdf)

See also

WdfTimerCreate