Microsoft Windows CE 3.0  

IDispatch::GetTypeInfo

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This method retrieves the type information for an object.

HRESULT GetTypeInfo(
unsigned int
iTInfo
,
LCID
lcid
,
ITypeInfo FAR *FAR *
ppTInfo
);

Parameters

iTInfo
Type information to return. Pass zero to retrieve type information for the IDispatchimplementation.
lcid
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 Values

One of the values described in the following table is returned.

Value Description
S_OK Success; the type information element exists.
DISP_E_BADINDEX Failure; iTInfoparameter was not 0.
TYPE_E_ELEMENTNOTFOUND Failure; iTInfoparameter was not 0.

Example

The following code from the sample file Lines.cpp loads information from the type library and implements the member function GetTypeInfo:

// These lines are from CLines::Create load type
information for the // Lines collection from the type library. hr =
LoadTypeInfo(&pLines->m_ptinfo, IID_ILines); if (FAILED(hr))
goto error; // Additional code omitted for brevity. // This
function implements GetTypeInfo for the CLines collection.
STDMETHODIMP CLines::GetTypeInfo( UINT iTInfo, LCID lcid, ITypeInfo
FAR* FAR* ppTInfo) { *ppTInfo = NULL; if(iTInfo != 0) return
ResultFromScode(DISP_E_BADINDEX); m_ptinfo->AddRef(); *ppTInfo =
m_ptinfo; return NOERROR; }

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Oaidl.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.