WDF_TIMER_CONFIG_INIT_PERIODIC - NtDoc

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

VOID WDF_TIMER_CONFIG_INIT_PERIODIC(
  [in] PWDF_TIMER_CONFIG Config,
  [in] PFN_WDF_TIMER     EvtTimerFunc,
  [in] LONG              Period
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

WDF_TIMER_CONFIG_INIT_PERIODIC function

Description

[Applies to KMDF and UMDF]

The WDF_TIMER_CONFIG_INIT_PERIODIC function initializes a WDF_TIMER_CONFIG structure for a periodic timer.

Parameters

Config [in]

A pointer to a WDF_TIMER_CONFIG structure.

EvtTimerFunc [in]

A pointer to a driver-supplied EvtTimerFunc callback function.

Period [in]

A time value. For more information about specifying this value, see WDF_TIMER_CONFIG.

Remarks

The WDF_TIMER_CONFIG_INIT_PERIODIC function zeros the specified WDF_TIMER_CONFIG structure. Then it sets the structure's Size member, stores the EvtTimerFunc pointer and Period value, sets the TolerableDelay member to zero and sets the AutomaticSerialization member to TRUE.

Examples

The following code example initializes a WDF_TIMER_CONFIG structure and a WDF_OBJECT_ATTRIBUTES structure and then calls WdfTimerCreate.

WDF_TIMER_CONFIG  timerConfig;
WDF_OBJECT_ATTRIBUTES  timerAttributes;
WDFTIMER  timerHandle;
NTSTATUS  Status;

WDF_TIMER_CONFIG_INIT_PERIODIC(
                               &timerConfig,
                               EchoEvtTimerFunc,
                               PERIODIC_TIMER_INTERVAL
                               );

WDF_OBJECT_ATTRIBUTES_INIT(&timerAttributes);
timerAttributes.ParentObject = Queue;

Status = WdfTimerCreate(
                        &timerConfig,
                        &timerAttributes,
                        &timerHandle
                        );

See also

EvtTimerFunc

WDF_TIMER_CONFIG

WDF_TIMER_CONFIG_INIT