KsCreateDefaultClock function

Given an IRP_MJ_CREATE request, the KsCreateDefaultClock function creates a default clock that uses the system clock as a time base and associates the IoGetCurrentIrpStackLocation(Irp)->FileObject with the clock using an internal dispatch table (KSDISPATCH_TABLE). Does not complete the IRP or set the status in the IRP.

The KsCreateDefaultClock function can only be called at PASSIVE_LEVEL.

Syntax

NTSTATUS KsCreateDefaultClock(
  _In_ PIRP            Irp,
  _In_ PKSDEFAULTCLOCK DefaultClock
);

Parameters

Irp

Specifies the IRP with the clock-create request being handled.

DefaultClock

Specifies an initialize default clock structure that is shared among any instance of the default clock for the parent.

Return Value

The KsCreateDefaultClock function returns STATUS_SUCCESS if successful, or an error if unsuccessful.

Remarks

The clock can be created after using KsAllocateDefaultClock to create and initialize the internal structures for a default clock instance. After initialization, many file objects can be created against the same underlying default clock instance.

Requirements

   
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib

See Also

KsAllocateDefaultClock

Send comments about this topic to Microsoft