PHW_QUERY_CLOCK_ROUTINE callback function (strmini.h)

Each stream may have a clock associated to it. The class driver queries the clock by calling the stream minidriver-supplied StrMiniClock function, provided in each stream's HW_STREAM_OBJECT.

Syntax

PHW_QUERY_CLOCK_ROUTINE PhwQueryClockRoutine;

void PhwQueryClockRoutine(
  [in] IN PHW_TIME_CONTEXT TimeContext
)
{...}

Parameters

[in] TimeContext

Pointer to the HW_TIME_CONTEXT structure that StrMiniClock must fill out with the requested information.

Return value

None

Remarks

A stream specifies its StrMiniClock function within the HwClockFunction member of the HW_CLOCK_OBJECT substructure of its HW_STREAM_OBJECT. The minidriver fills out the HW_STREAM_OBJECT for a stream within its StrMiniReceiveDevicePacket routine in response to a SRB_OPEN_STREAM request.

When the class driver calls StrMiniClock, it fills in the HwDeviceExtension, HwStreamObject, and Function members of the TimeContext parameter. It expects StrMiniClock to fill in the Time member with the time value, in 100-nanosecond units, specified in the Function parameter. StrMiniClock must also fill in the SystemTime member with the current system time, by calling KeQueryPerformanceCounter, and converting the result to 100-nanosecond units.

The StrMiniClock routine must handle the functions specified in the ClockSupportFlags of the clock's HW_CLOCK_OBJECT. See HW_CLOCK_OBJECT for details.

Requirements

Requirement Value
Target Platform Desktop
Header strmini.h (include Strmini.h)

See also

HW_CLOCK_OBJECT

HW_TIME_CONTEXT