ITypeLib::GetTypeInfo

ITypeLib::GetTypeInfo(index, lplpitinfo)
unsigned int
index
ITypeInfo FAR* FAR* lplpitinfo

Retrieves the specified type description in the library.

Parameters

index

Index of the ITypeInfo to be returned.

lplpitinfo

If successful, returns a pointer to the ITypeInfo.

Return Value

The SCODE obtained from the returned HRESULT is one of the following:

SCODE
Meaning
S_OK
Success.
TYPE_E_ELEMENTNOTFOUND
Index is outside the range of 0 to GetTypeInfoCount() pics/OLE00090001.gif1.
E_OUTOFMEMORY
Out of memory.
E_INVALIDARG
One or more of the arguments is invalid.
TYPE_E_IOERROR
The function could not read from the file.
TYPE_E_INVDATAREAD
The function could not read from the file.
TYPE_E_UNSUPFORMAT
The type library has an old format.
TYPE_E_REGISTRYACCESS
There was an error accessing the system registration database.
TYPE_E_INVALIDSTATE
The type library could not be opened.

Comments

For dual interfaces, ITypeLib::GetTypeInfo returns only the TKIND_DISPATCH typeinfo. To get the TKIND_INTERFACE typeinfo, call ITypeInfo::GetRefTypeOfImplType on the TKIND_DISPATCH typeinfo, passing an index of pics/OLE00090001.gif1. Then pass the returned typeinfo handle to ITypeInfo::GetRefTypeInfo.

Example

The following example gets the TKIND_INTERFACE typeinfo for a dual interface.

ptlib->GetTypeInfo((unsigned int) dwIndex, &ptypeinfoDisp);

ptypeinfoDisp->GetRefTypeOfImplType(-1, &phreftype);

ptypeinfoDisp->GetRefTypeInfo(phreftype, &ptypeinfoInt);

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples