The CBaseDispatch class is a base class that implements the IDispatch interface for use in a dual interface. A dual interface provides Automation and custom interface access to an interface.
CMediaControl and CMediaPosition (and other dual-interface support classes) are derived from this class or have members that are instances of this class.
For more information about the IDispatch methods, see the COM documentation included with the Microsoft® Platform Software Development Kit (SDK).
Member Functions
| Name | Description |
| CBaseDispatch | Constructs a CBaseDispatch object. |
Implemented IDispatch Methods
| Name | Description |
| GetIDsOfNames | Maps a single member function and an optional set of parameters to a corresponding set of integer dispatch identifiers, which can be used upon subsequent calls to the IDispatch::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. |
Constructs a CBaseDispatch object.
CBaseDispatch( );
No return value.
Maps a single member function and an optional set of parameters to a corresponding set of integer dispatch identifiers, which can be used upon subsequent calls to the IDispatch::Invoke method.
HRESULT GetIDsOfNames(
REFIID riid,
OLECHAR ** rgszNames,
UINT cNames,
LCID lcid,
DISPID * rgdispid
);
Returns one of the following values.
| Value | Meaning |
| S_OK | Success. |
| E_OUTOFMEMORY | Out of memory. |
| 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. |
| DISP_E_UNKNOWN_CLSID | The class identifier was not recognized. |
Retrieves a type-information object, which can retrieve the type information about an interface.
HRESULT GetTypeInfo(
UINT itinfo,
LCID lcid,
ITypeInfo ** pptinfo
);
Returns an E_POINTER if pptinfo is invalid. Returns TYPE_E_ELEMENTNOTFOUND if itinfo is not zero. Returns S_OK if is successful. Otherwise, returns an HRESULT from one of the calls to retrieve the type. The HRESULT indicates the error and can be one of the following standard constants, or other values not listed:
| Value | Meaning |
| E_FAIL | Failure. |
| E_POINTER | Null pointer argument. |
| E_INVALIDARG | Invalid argument. |
| S_OK or NOERROR | Success. |
Retrieves the number of type-information interfaces provided by an object.
HRESULT GetTypeInfoCount(
UINT * pctinfo
);
Returns E_POINTER if pctinfo is invalid; otherwise, returns S_OK.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.