GetTypeInfo
(Available in 01 TS COM - TS_COM_IDispatch)
Purpose
Get the 'TypeInfo' interface
Syntax
hResult:=oSomeIObject:GetTypeInfo( 0, TS_Locale( ), @oAITypeInfo )
Arguments
iTypeInfo
|
INT
|
dwLCID
|
DWORD
|
poAITypeInfo
|
TS_AbstractITypeInfo PTR
|
Description
Get the 'TypeInfo' interface
MSDN ==== IDispatch::GetTypeInfo Retrieves the type information for an object, which can then be used to get the type information for an interface.
HRESULT GetTypeInfo( unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo );
Parameters iTInfo = The type information to return. Pass 0 to retrieve type information for the IDispatch implementation. lcid = The locale identifier for the type information. An object may be able to return different type information for different languages. This is important for classes that support localized member names. For classes that do not support localized member names, this parameter can be ignored. ppTInfo = Receives a pointer to the requested type information object.
Return Value The return value obtained from the returned HRESULT is one of the following:
Return value Meaning S_OK = Success; the type information element exists. DISP_E_BADINDEX = Failure; iTInfo argument was not 0.
Returns
hResult
Example
LOCAL oAITypeInfo AS TS_AbstractITypeInfo
hResult:=oSomeIObject:GetTypeInfo( 0, TS_Locale( ), @oAITypeInfo )
IF TS_Succeeded( hResult )
// Start using the 'oAITypeInfo'
oAITypeInfo:Release( )
END
Source
METHOD GetTypeInfo( iTypeInfo AS INT, dwLCID AS DWORD, poAITypeInfo AS TS_AbstractITypeInfo ; ...
...PTR ) AS LONG PASCAL CLASS TS_IDispatch
LOCAL oAIOuterDispatch AS TS_AbstractIDispatch
LOCAL hResult AS LONG
TSTrace Enter
TSTrace ToDo NB "Aggregation needs to be tested"
DO CASE
CASE !SELF:IsValidObject
TSTrace Warning "!SELF:IsValidObject"
IF poAITypeInfo<>NULL_PTR
OBJECT( PTR(