IQueueCommand::InvokeAtPresentationTime method (control.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The InvokeAtPresentationTime method queues a method to be invoked at the specified presentation time.

Syntax

HRESULT InvokeAtPresentationTime(
  [out]     IDeferredCommand **pCmd,
  [in]      REFTIME          time,
  [in]      GUID             *iid,
  [in]      long             dispidMethod,
  [in]      short            wFlags,
  [in]      long             cArgs,
  [in]      VARIANT          *pDispParams,
  [in, out] VARIANT          *pvarResult,
  [out]     short            *puArgErr
);

Parameters

[out] pCmd

Address of a variable that receives an IDeferredCommand interface pointer.

[in] time

Time at which to invoke the command.

[in] iid

Pointer to the interface identifier (IID) of interface.

[in] dispidMethod

Dispatch identifier (DISPID) of a method or property on the interface. Equivalent to the dispIdMember parameter of the IDispatch::Invoke method.

[in] wFlags

Flags describing the context of the call. Equivalent to the wFlags parameter of the IDispatch::Invoke method.

[in] cArgs

Number of arguments in pDispParams. Equivalent to the cArgs member of the DISPPARAMS structure.

[in] pDispParams

Pointer to an array that contains the arguments. Equivalent to the rgvarg member of the DISPPARAMS structure.

[in, out] pvarResult

Pointer a VARIANT that receives the result. Equivalent to the pVarResult parameter of the IDispatch::Invoke method.

[out] puArgErr

Pointer to a variable that receives the index of the first argument that has an error. Equivalent to the puArgErr parameter of the IDispatch::Invoke method.

Return value

Returns an HRESULT value.

Remarks

Use the IDispatch::GetIDsOfNames method to retrieve the DISPID for the dispidMember parameter.

For a code example, see IQueueCommand::InvokeAtStreamTime.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header control.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IQueueCommand Interface