Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Windows Mobile 6.5
A version of this page is also available for

This method retrieves the type information for an object.

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


[in] Type information to return. Pass zero to retrieve type information for the IDispatch implementation.


[in] 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.


[out] Receives a pointer to the requested type information object.

The following table shows the return values for this function.

Value Description


Success; the type information element exists.


Failure; iTInfo parameter was not 0.


Failure; iTInfo parameter was not 0.

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.
UINT iTInfo,
LCID lcid,
ITypeInfo FAR* FAR* ppTInfo)
*ppTInfo = NULL;
if(iTInfo != 0)
return ResultFromScode(DISP_E_BADINDEX);
*ppTInfo = m_ptinfo;
  return NOERROR;

Headeroaidl.h, oaidl.idl
Libraryoleaut32.lib, uuid.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

© 2015 Microsoft