ITypeLib::GetTypeComp
ITypeLib::GetTypeComp(lplptcomp)
ITypeComp FAR* FAR* lplptcomp
Enables a client compiler to bind to the library's types, variables, constants
and global functions.
Parameter
lplptcomp
Points to a pointer to the
ITypeComp instance for this
ITypeLib that a client compiler can use to bind to types in the
ITypeLib and to the global functions, variables, and constants defined in the
ITypeLib.
Return Value
The SCODE obtained from the returned HRESULT is one of the following:
SCODE
| Meaning
|
S_OK
| Success.
|
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_INVALIDSTATE
| The type library could not be opened.
|
TYPE_E_WRONGTYPEKIND
| Type mismatch.
|
Comments
The
Bind function of the returned
TypeComp binds to global functions, variables, constants, enumerated values, and
coclass members. The
Bind function also binds the names of the TYPEKINDs 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
ITypeComp, without specifying the name of the module.
ITypeComp::Bind and
ITypeComp::BindType accept only unqualified names.
ITypeLib::GetTypeComp returns a pointer to the
ITypeComp interface, 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,
GetTypeComp can 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.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples