Bewerken

Delen via


PFNKSSETTIMER callback function (ks.h)

A streaming minidriver's KStrSetTimer routine is called to generate DPC timer callbacks based on presentation time.

Syntax

PFNKSSETTIMER Pfnkssettimer;

BOOLEAN Pfnkssettimer(
  [in] PVOID Context,
  [in] PKTIMER Timer,
  [in] LARGE_INTEGER DueTime,
  [in] PKDPC Dpc
)
{...}

Parameters

[in] Context

Pointer to the minidriver-supplied information context. The minidriver passes the information context to KsAllocateDefaultClockEx in the function's DeferredContext parameter when the minidriver allocates a custom DPC timer object.

[in] Timer

Pointer to a timer object allocated by the minidriver.

[in] DueTime

Specifies the absolute or relative time at which the timer is to expire. If the value of the DueTime parameter is negative, the expiration time is relative to the current system time. Otherwise, the expiration time is absolute. The expiration time is expressed in system time units (100-nanosecond intervals). Absolute expiration times track any changes in the system time; relative expiration times are not affected by system time changes.

[in] Dpc

Pointer to a DPC object that the minidriver initialized using KeInitializeDpc. This parameter is optional.

Return value

Returns TRUE if the timer object was already in the system timer queue. Otherwise, returns FALSE.

Remarks

Minidrivers can optionally supply a KStrSetTimer callback function as an argument to KsAllocateDefaultClockEx.

Typically, if a minidriver supplies a KStrCorrelatedTime callback function, then the minidriver also supplies a KStrSetTimer callback function.

If minidrivers supply a KStrSetTimer callback function, the function must set timers, based on deltas, to the current presentation time in order to generate event notifications.

If a minidriver supplies a KStrSetTimer callback function, the minidriver must also supply a KStrCancelTimer callback function to cancel the timer.

The minidriver supplied KStrSetTimer must have the same characteristics as KeSetTimerEx.

Requirements

Requirement Value
Target Platform Desktop
Header ks.h (include Ks.h)

See also

KStrCancelTimer

KeInitializeDpc

KeSetTimerEx

KsAllocateDefaultClockEx