Microsoft DirectX 8.0 |
Handles the IDispatch methods of the IMediaPosition dual interface.
This class inherits the IMediaPosition interface but does not implement it. It implements IDispatch through the CBaseDispatch class and the Microsoft® DirectShow® type library. Do not use this class directly. Instead, use one of the following classes:
Public Methods | |
---|---|
CMediaPosition | Constructor method. |
IDispatch Methods | |
GetIDsOfNames | Maps a set of names to a corresponding set of DISPIDs. |
GetTypeInfo | Retrieves the type information for the object, which can then be used to get the type information for an interface. |
GetTypeInfoCount | Retrieves the number of type information interfaces the object provides. |
Invoke | Provides access to properties and methods exposed by the object. |
Constructor method.
Syntax
CMediaPosition( const TCHAR *pName, LPUNKNOWN pUnk ); CMediaPosition( const TCHAR *pName, LPUNKNOWN pUnk HRESULT *phr );
Parameters
- pName
- Pointer to the name of the object, for debugging purposes. Allocate this parameter in static memory.
- pUnk
- Pointer to the owner of this object, or NULL if the object is not aggregated.
- phr
- Ignored.
Maps a set of names to a corresponding set of DISPIDs.
Syntax
HRESULT GetIDsOfNames( REFIID riid, OLECHAR **rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid );
Parameters
- riid
- Reserved. Use IID_NULL.
- rgszNames
- Address of an array of wide-character strings that contain the names to be mapped.
- cNames
- Size of the array given by the rgszNames parameter.
- lcid
- Locale context in which to interpret the names. Can be NULL.
- rgdispid
- Pointer to an array that receives the DISPIDs. Each element of receives an identifier that corresponds to one of the names passed in the rgszNames parameter.
Return Value
Returns an HRESULT value. Possible values include the following.
S_OK Success. E_OUTOFMEMORY Insufficient memory. DISP_E_UNKNOWNNAME One or more of the names were not known.
Retrieves the type information for the object, which can then be used to get the type information for an interface.
Syntax
HRESULT GetTypeInfo( UINT itinfo, LCID lcid, ITypeInfo **pptinfo );
Parameters
- itinfo
- Type information to return. Must be zero.
- lcid
- Locale identifier.
- pptinfo
- Address of a variable that receives an ITypeInfo pointer.
Return Value
Returns an HRESULT value. Possible values include the following.
S_OK Success. E_POINTER Null pointer argument. TYPE_E_ELEMENTNOTFOUND The itinfo parameter is not zero.
Retrieves the number of type information interfaces the object provides.
Syntax
HRESULT GetTypeInfoCount( UINT *pctinfo );
Parameters
- pctinfo
- Pointer to a variable that receives the number of type-information interfaces provided by the object. When the method returns, the value is 1.
Return Value
Returns one of the following values.
S_OK Success. E_POINTER Null pointer argument.
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.
S_OK Success. DISP_E_UNKNOWNINTERFACE The riid parameter is not IID_NULL