KsCreateClock2 function (ks.h)

Creates a handle to a clock instance. Call this function after the Component Object Model (COM) is initialized.

Supported starting in Windows 8.

Syntax

KSDDKAPI HRESULT KsCreateClock2(
  [in]  HANDLE          ConnectionHandle,
  [in]  PKSCLOCK_CREATE ClockCreate,
  [out] PHANDLE         ClockHandle
);

Parameters

[in] ConnectionHandle

Specifies the handle to the connection on which to create the clock.

[in] ClockCreate

Specifies clock create parameters. This currently consists of a flag that must be set to zero.

[out] ClockHandle

Specifies the new clock handle.

Return value

Returns NOERROR if successful; otherwise, returns an error code.

Remarks

This is a new version of the KsCreateClock function and uses the device broker to create the handle to the kernel streaming object. In addition, the COM CoInitialize function must be called before this function is called.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Universal
Header ks.h (include Ks.h)
IRQL PASSIVE_LEVEL

See also

CoInitialize

KsCreateClock