Microsoft Windows CE 3.0  

ITypeInfo::GetTypeComp

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 ITypeCompinterface for the type description, which enables a client compiler to bind to the type description's members.

HRESULT GetTypeComp(
ITypeComp FAR *FAR *
ppTComp
);

Parameters

ppTComp
Pointer to a pointer to the ITypeCompinstance for this ITypeLib. A client compiler uses the methods in the ITypeCompinterface to bind to types in ITypeLib, as well as to the global functions, variables, and constants defined in ITypeLib.

Return Values

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

Value Description
S_OK Success.
E_OUTOFMEMORY Out of memory.
E_INVALIDARG One or more of the parameters is invalid.
TYPE_E_IOERROR The function could not read from the file.
TYPE_E_INVDATAREAD Invalid data.
TYPE_E_UNSUPFORMAT The type library has an older format.
TYPE_E_INVALIDSTATE The type library could not be opened.
TYPE_E_WRONGTYPEKIND Type mismatch.

Remarks

The Bindfunction of the returned TypeCompbinds to global functions, variables, constants, enumerated values, and coclass members. The Bindfunction also binds the names of the TYPEKINDenumerations of TKIND_MODULE, TKIND_ENUM, and TKIND_COCLASS. These names shadow any global names defined within the type information. The members of TKIND_ENUM, TKIND_MODULE, and TKIND_COCLASS types marked as Application objects can be directly bound to from ITypeCompwithout specifying the name of the module.

ITypeComp::Bind and ITypeComp::BindTypeaccept only unqualified names. ITypeLib::GetTypeCompreturns a pointer to the ITypeCompinterface, which is then used to bind to global elements in the library. The names of some types (TKIND_ENUM, TKIND_MODULE, and TKIND_COCLASS) share the name space with variables, functions, constants, and enumerators.

If a member requires qualification to differentiate it from other items in the name space, GetTypeCompcan be called successively for each qualifier in order to bind to the desired member. This allows programming language compilers to access members of modules, enumerations, and coclasses, even though the member can't be bound to with a qualified name.

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.