DirectShow Animated Header -- CBaseDispatch Class DirectShow Animated Header -- CBaseDispatch Class* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: CBaseControlWindow Class
*Next Topic: CBaseFilter Class

CBaseDispatch Class


CBaseDispatch class hierarchy

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.


CBaseDispatch::CBaseDispatch

CBaseDispatch Class

Constructs a CBaseDispatch object.

CBaseDispatch( );

Return Values

No return value.


CBaseDispatch::GetIDsOfNames

CBaseDispatch Class

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
  );

Parameters
riid
Reference identifier. Reserved for future use. Must be NULL.
rgszNames
Passed-in array of names to be mapped.
cNames
Count of the names to be mapped.
lcid
Local context in which to interpret the names.
rgdispid
Caller-allocated array, each element of which contains an identifier that corresponds to one of the names passed in the rgszNames parameter. The first element represents the member name; the subsequent elements represent each of the member's parameters.
Return Values

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.


CBaseDispatch::GetTypeInfo

CBaseDispatch Class

Retrieves a type-information object, which can retrieve the type information about an interface.

HRESULT GetTypeInfo(
  UINT itinfo,
  LCID lcid,
  ITypeInfo ** pptinfo
  );

Parameters
itinfo
Type information to return. Pass zero to retrieve type information for the IDispatch implementation.
lcid
Local identifier for the type information. An object can return different type information for different languages. This capability is important for classes that support localized member names. For classes that do not support localized member names, ignore this parameter.
pptinfo
Pointer to the type-information object requested.
Return Values

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.


CBaseDispatch::GetTypeInfoCount

CBaseDispatch Class

Retrieves the number of type-information interfaces provided by an object.

HRESULT GetTypeInfoCount(
  UINT * pctinfo
  );

Parameters
pctinfo
Pointer to the location that receives the number of type-information interfaces that the object provides. If the object provides type information, this number is 1; otherwise, the number is 0.
Return Values

Returns E_POINTER if pctinfo is invalid; otherwise, returns S_OK.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page