Platform SDK: DirectX

IReferenceClock::AdviseTime

The IReferenceClock::AdviseTime method requests an asynchronous notification that a time has elapsed.

HRESULT AdviseTime(
  REFERENCE_TIME rtBaseTime,
  REFERENCE_TIME rtStreamTime,
  HEVENT hEvent,
  DWORD * pdwAdviseCookie
);

Parameters

rtBaseTime
Base reference time.
rtStreamTime
Stream offset time.
hEvent
Handle to an event through which to advise.
pdwAdviseCookie
Address of a variable to receive the identifier of the request. This is used to identify this call to AdviseTime 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 rtBaseTime plus rtStreamTime is reached, the event whose handle is hEvent is set. If the time has already passed, the event is set immediately.

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