IReferenceClock::AdvisePeriodic
The AdvisePeriodic method requests an asynchronous, periodic notification that a duration has elapsed.
Syntax
HRESULT AdvisePeriodic(
REFERENCE_TIME startTime,
REFERENCE_TIME periodTime,
HANDLE hSemaphore,
DWORD * pdwAdviseCookie
);
Parameters
startTime
Time when notification should begin.
periodTime
Period of time between notifications.
hSemaphore
Handle of a semaphore through which to advise.
pdwAdviseCookie
Address of a variable that receives 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 error values shown in the following table.
Return code |
E_FAIL |
E_POINTER |
E_INVALIDARG |
E_NOTIMPL |
Remarks
When the time indicated by startTime is reached, the semaphore whose handle is set as hSemaphore is released. Thereafter, the semaphore is released repetitively with a period of periodTime.
Requirements
** Header:** Dmusicc.h
See Also