// 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
No description available.
[Applies to KMDF and UMDF]
The WDF_TIMER_CONFIG_INIT_PERIODIC function initializes a WDF_TIMER_CONFIG structure for a periodic timer.
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.
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.
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
);