Platform SDK: DirectX

IReferenceClock::AdvisePeriodic

The IReferenceClock::AdvisePeriodic method requests an asynchronous, periodic notification that a duration has elapsed.

HRESULT AdvisePeriodic(
  REFERENCE_TIME rtStartTime,
  REFERENCE_TIME rtPeriodTime,
  HSEMAPHORE hSemaphore,
  DWORD * pdwAdviseCookie
);

Parameters

rtStartTime
Time that the notification should begin.
rtPeriodTime
Period of time between notifications.
hSemaphore
Handle of a semaphore through which to advise.
pdwAdviseCookie
Address of a variable to receive the identifier of the request. This is used to identify this call to AdvisePeriodic in the future—for example, to cancel it.

Return Values

Return values are determined by the implementation. If the method succeeds, it returns S_OK.

If it fails, the method can return one of the following error values:

E_FAIL
E_POINTER
E_INVALIDARG
E_NOTIMPL

Remarks

When the time indicated by rtStartTime is reached, the semaphore whose handle is set as hSemaphore is released. Thereafter, the semaphore is released repetitively with a period of rtPeriodTime.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusicc.h.

See Also

IReferenceClock::Unadvise