WDF_TIMER_CONFIG_INIT_PERIODIC function

[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

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.

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

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdftimer.h (include Wdf.h)

Library

None

IRQL

Any level

See also

EvtTimerFunc
WDF_TIMER_CONFIG
WDF_TIMER_CONFIG_INIT

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft