The CMediaControl class provides base class handling of the IDispatch methods of the dual-interface IMediaControl. It leaves as pure virtual the properties and methods of the IMediaControl interface.
Typically, the filter graph manager is the only object that implements the IMediaControl interface. (Filters implement the IMediaFilter interface, inherited by IBaseFilter, to receive control commands from the filter graph manager.) Therefore, this class library is of limited use to filter developers.
The CMediaControl::GetIDsOfNames, CMediaControl::GetTypeInfo, CMediaControl::GetTypeInfoCount, and CMediaControl::Invoke member functions are standard implementations of the IDispatch methods using the CBaseDispatch class (and a type library) to parse the commands and pass them to the pure virtual methods of the IMediaControl interface.
The IMediaControl methods, defined in control.odl, are left as pure virtual.
Member Functions
Name | Description |
CMediaControl | Constructs a CMediaControl object. |
Implemented INonDelegatingUnknown Methods
Name | Description |
NonDelegatingQueryInterface | Returns a specified reference-counted interface. |
Implemented IDispatch Methods
Name | Description |
GetIDsOfNames | Maps a single member and an optional set of parameters to a corresponding set of integer dispatch identifiers (DISPIDs), which can be used during subsequent calls to the CMediaControl::Invoke method. |
GetTypeInfo | Retrieves a type-information object, which can retrieve the type information for an interface. |
GetTypeInfoCount | Retrieves the number of type-information interfaces provided by an object. |
Invoke | Provides access to properties and methods exposed by an object. |
Constructs a CMediaControl object.
CMediaControl(
const TCHAR *pName,
LPUNKNOWN pUnk
);
No return value.
Allocate the pName parameter in static memory. This name appears on the debugging terminal upon creation and deletion of the object.
Maps a single member function and an optional set of parameters to a corresponding set of integer dispatch identifiers (DISPIDs), which can be used upon subsequent calls to the CMediaControl::Invoke member function.
HRESULT GetIDsOfNames(
REFIID riid,
OLECHAR ** rgszNames,
UINT cNames,
LCID lcid,
DISPID * rgdispid
);
Returns one of the following values.
Value | Meaning |
DISP_E_UNKNOWN_CLSID | The CLSID was not recognized. |
DISP_E_UNKNOWNNAME | One or more of the names were not known. The returned DISPIDs contain DISPID_UNKNOWN for each entry that corresponds to an unknown name. |
E_OUTOFMEMORY | Out of memory. |
S_OK | Success. |
Retrieves a type-information object, which can retrieve the type information for an interface.
HRESULT GetTypeInfo(
UINT itinfo,
LCID lcid,
ITypeInfo ** pptinfo
);
Returns an HRESULT value.
Retrieves the number of type-information interfaces provided by an object.
HRESULT GetTypeInfoCount(
UINT * pctinfo
);
Returns an HRESULT value.
Provides access to properties and methods exposed by an object.
HRESULT Invoke(
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS * pdispparams,
VARIANT * pvarResult,
EXCEPINFO * pexcepinfo,
UINT * puArgErr
);
Returns an HRESULT value.
Returns a specified reference-counted interface.
HRESULT NonDelegatingQueryInterface(
REFIID riid,
void **ppv
);
Returns pointers to the IMediaControl and IUnknown interfaces by default.
Override this member function to publish any additional interfaces implemented by the derived class.
This member function implements the INonDelegatingUnknown::NonDelegatingQueryInterface method.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.