CMediaControl.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.]
Provides access to properties and methods exposed by an 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 CMediaControl::GetIDsOfNames or the object's documentation 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
CMediaControl::Invoke
call. -
pdispparams
-
Pointer to a structure containing an array of arguments, an array of argument dispatch IDs for named arguments, and counts for number of elements in the arrays.
-
pvarResult
-
Pointer to where the result is to be stored, or NULL if the caller expects no result.
-
pexcepinfo
-
Pointer to a structure containing exception information.
-
puArgErr
-
Pointer to the index of the first argument, within the DISPPARAMS structure's rgvarg array, that has an error. For more information on DISPPARAMS, see the Platform SDK.
Return value
Returns DISP_E_UNKNOWNINTERFACE if riid is not IID_NULL. Returns one of the error codes from CMediaControl::GetTypeInfo if the call fails. Otherwise, returns the HRESULT from the call to IDispatch::Invoke.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|