This section describes ITypeInfo, an interface typically used for reading information about objects. For example, an object browser tool can use ITypeInfo to extract information about the characteristics and capabilities of objects from type libraries.
The ITypeInfo interface inherits from the IUnknown interface. ITypeInfo also has these types of members:
The ITypeInfo interface has these methods.
Retrieves the addresses of static functions or variables, such as those defined in a DLL.
Creates a new instance of a type that describes a component object class (coclass).
Retrieves the containing type library and the index of the type description within that type library.
Retrieves a description or specification of an entry point for a function in a DLL.
Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description.
Retrieves the FUNCDESC structure that contains information about a specified function
Maps between member names and member IDs, and parameter names and parameter IDs.
Retrieves the IMPLTYPEFLAGS enumeration for one implemented interface or base interface in a type description.
Retrieves marshaling information.
Retrieves the variable with the specified member ID or the name of the property or method and the parameters that correspond to the specified function ID.
If a type description references other type descriptions, it retrieves the referenced type descriptions.
If a type description describes a COM class, it retrieves the type description of the implemented interface types.
Retrieves a TYPEATTR structure that contains the attributes of the type description.
Retrieves the ITypeComp interface for the type description, which enables a client compiler to bind to the type description's members.
Retrieves a VARDESC structure that describes the specified variable.
Invokes a method, or accesses a property of an object, that implements the interface described by the type description.
Releases a FUNCDESC previously returned by ITypeInfo::GetFuncDesc.
Releases a TYPEATTR previously returned by ITypeInfo::GetTypeAttr.
Releases a VARDESC previously returned by ITypeInfo::GetVarDesc.
Type information interfaces are intended to describe the parts of the application that can be called by outside clients, rather than those that might be used internally to build an application.
The ITypeInfo interface provides access to the following:
The set of function descriptions associated with the type. For interfaces, this contains the set of member functions in the interface.
The set of data member descriptions associated with the type. For structures, this contains the set of fields of the type.
The general attributes of the type, such as whether it describes a structure, an interface, and so on.
An instance of ITypeInfo provides various information about the type of an object, and is used in different ways. A compiler can use an ITypeInfo to compile references to members of the type. A type interface browser can use it to find information about each member of the type. An IDispatch implementor can use it to provide automatic delegation of IDispatch calls to an interface.
Build date: 10/26/2012