Share via


CBaseReferenceClock::AdviseTime (Compact 2013)

3/26/2014

Sets up a one-shot notification with the clock.

Syntax

HRESULT AdviseTime(
  REFERENCE_TIME baseTime,
  REFERENCE_TIME streamTime,
  HEVENT hEvent,
  DWORD* pdwAdviseToken
);

Parameters

  • baseTime
    Base reference time.
  • streamTime
    Stream offset time.
  • hEvent
    Advise through this event.
  • pdwAdviseToken
    Where the advise token goes.

Return Value

Returns one of the following HRESULT values.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

Invalid argument.

NOERROR

No error.

Remarks

This member function implements the IReferenceClock::AdviseTime method.

At the time specified in the baseTime plus the streamTime parameters, the event specified in hEvent is set.

It is correct to call CBaseReferenceClock::Unadvise to remove the link after the event occurs, but it is not necessary. One-shot notifications are cleared by the clock when they have signaled.

To cancel a one-shot notification before the time is reached, call Unadvise and pass the pdwAdviseToken value returned from this call.

Requirements

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CBaseReferenceClock Class