Microsoft DirectX 9.0 |
The AdvisePeriodic method creates a periodic advise request. This method implements the IReferenceClock::AdvisePeriodic method.
Syntax
HRESULT AdvisePeriodic(
REFERENCE_TIME StartTime,
REFERENCE_TIME PeriodTime,
HSEMAPHORE hSemaphore,
DWORD *pdwAdviseToken
);
Parameters
StartTime
Time of the first notification, in 100-nanosecond units. Must be greater than zero and less than MAX_TIME.
PeriodTime
Time between notifications, in 100-nanosecond units. Must be greater than zero.
hSemaphore
Handle to a semaphore, created by the caller.
pdwAdviseToken
Pointer to a variable that receives an identifier for the advise request.
Return Value
Returns one of the HRESULT values shown in the following table.
Value | Description |
S_OK | Success |
E_INVALIDARG | Invalid time values |
E_OUTOFMEMORY | Failure |
E_POINTER | NULL pointer argument |
Remarks
At each notification time, the clock releases the semaphore specified in the hSemaphore parameter. When no further notifications are required, call the CBaseReferenceClock::Unadvise method and pass the pdwAdviseToken value returned from this call.
See Also