CMediaPosition.Invoke method

[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 Invoke method provides access to properties and methods exposed by the object.

Syntax

HRESULT Invoke(
   DISPID     dispidMember,
   REFIID     riid,
   LCID       lcid,
   WORD       wFlags,
   DISPPARAMS *pdispparams,
   VARIANT    *pvarResult,
   EXCEPINFO  *pexcepinfo,
   UINT       *puArgErr
);

Parameters

dispidMember

Identifier of the member. Use CMediaPosition::GetIDsOfNames to obtain the dispatch identifier.

riid

Reserved for future use. Must be IID_NULL.

lcid

Locale context in which to interpret arguments.

wFlags

Flags describing the context of the call.

pdispparams

Pointer to a DIPPARAMS structure that contains the arguments.

pvarResult

Pointer to a VARIANT that receives the result, or NULL if the caller expects no result.

pexcepinfo

Pointer to a structure that receives exception information.

puArgErr

Pointer to a variable that receives the index of the first argument that causes an error.

Return value

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK
Success.
DISP_E_UNKNOWNINTERFACE
The riid parameter is not IID_NULL

Requirements

Requirement Value
Header
Ctlutil.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CMediaPosition Class