WDF_TIMER_CONFIG_INIT_PERIODIC function (wdftimer.h)
[Applies to KMDF and UMDF]
The WDF_TIMER_CONFIG_INIT_PERIODIC function initializes a WDF_TIMER_CONFIG structure for a periodic timer.
Syntax
void WDF_TIMER_CONFIG_INIT_PERIODIC(
[in] PWDF_TIMER_CONFIG Config,
[in] PFN_WDF_TIMER EvtTimerFunc,
[in] LONG Period
);
Parameters
[in] Config
A pointer to a WDF_TIMER_CONFIG structure.
[in] EvtTimerFunc
A pointer to a driver-supplied EvtTimerFunc callback function.
[in] Period
A time value. For more information about specifying this value, see WDF_TIMER_CONFIG.
Return value
None
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
);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdftimer.h (include Wdf.h) |
Library | None |
IRQL | Any level |