WdfTimerGetParentObject - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdftimer.h

WDFOBJECT WdfTimerGetParentObject(
  [in] WDFTIMER Timer
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdftimer-wdftimergetparentobject)

WdfTimerGetParentObject function

Description

[Applies to KMDF and UMDF]

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

Parameters

Timer [in]

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);
...
}

See also

WdfTimerCreate