A type library is a container for type descriptions of one or more objects, and is accessed through the ITypeLib interface. The ITypeLib interface provides access to information about the type description in a type library. The descriptions of individual objects are accessed through the ITypeInfo interface.
In addition, there are two new interfaces for Automation:
Because they inherit from ITypeInfo and ITypeLib, an ITypeInfo2 can be cast to an ITypeInfo instead of using the calls QueryInterface() and Release().
By adding the new methods described in the following section, QueryInterface can be called to ITypeInfo2 and ITypeLib2 in the same way as ITypeInfo and ITypeLib.
The following table describes the member functions of each of the type description interfaces:
Interface | Member function | Purpose |
---|---|---|
ITypeLib | FindName | Finds occurrences of a type description in a type library. |
GetDocumentation | Retrieves the library's documentation string, name of the complete Help file name and path, and the context identifier for the library Help topic. | |
GetLibAttr | Retrieves the structure containing the library's attributes. | |
GetTypeComp | Retrieves a pointer to the ITypeComp for a type library. This enables a client compiler to bind to the library's types, variables, constants, and global functions. | |
GetTypeInfo | Retrieves the specified type description in the library. | |
GetTypeInfoCount | Retrieves the number of type descriptions in the library. | |
GetTypeInfoOfGuid | Retrieves the type description corresponding to the specified globally unique identifier (GUID). | |
GetTypeInfoType | Retrieves the type of a type description. | |
IsName | Indicates whether a passed-in string contains the name of a type, or a member described in the library. | |
ReleaseTLibAttr | Releases TLIBATTR, originally obtained from ITypeLib::GetLibAttr. | |
ITypeLib2 | GetCustData | Gets custom data. |
GetDocumentation2 | Retrieves the library's documentation string and Help related information. | |
GetLibStatistics | Returns statistics about a type library that are required for efficient sizing of hash tables. | |
GetAllCustData | Gets all custom data items for the library. | |
ITypeInfo | AddressOfMember | Retrieves the addresses of static functions or variables, such as those defined in a dynamic link library (DLL). |
CreateInstance | Creates a new instance of a type that describes a component object class (coclass). | |
GetContainingTypeLib | Retrieves both the type library that contains a specific type description and the index of the type description within the type library. | |
GetDllEntry | Retrieves a description or specification of an entry point for a function in DLL. | |
GetDocumentation | Retrieves the documentation string, name of the complete Help file name and path, and the context identifier for the Help topic for a specified type description. | |
GetFuncDesc | Retrieves the FUNCDESC structure that contains information about a specified function. | |
GetIDsOfNames | Maps between member names and member identifiers, and parameter names and parameter identifiers. | |
GetImplTypeFlags | Retrieves the IMPLTYPE flags for an interface. | |
GetMops | Retrieves marshaling information. | |
GetNames | Retrieves the variable with the specified member identifier, or the name of the function and parameter names corresponding to the specified function identifier. | |
GetRefTypeInfo | Retrieves the type descriptions referenced by a given type description. | |
GetRefTypeOfImplType | Retrieves the type description of implemented interface types for a coclass or an inherited interface. | |
GetTypeAttr | Retrieves a TYPEATTR structure that contains the attributes of the type description. | |
GetTypeComp | Retrieves the ITypeComp interface for the type description, which enables a client compiler to bind to the type description's members. | |
GetVarDesc | Retrieves a VARDESC structure that describes the specified variable. | |
Invoke | Invokes a method or accesses a property of an object that implements the interface described by the type description. | |
ReleaseFuncDesc | Releases a FUNCDESC previously returned by GetFuncDesc. | |
ReleaseTypeAttr | Releases a TYPEATTR previously returned by GetTypeAttr. | |
ReleaseVarDesc | Releases a VARDESC previously returned by GetVarDesc. | |
ITypeInfo2 | GetTypeKind | Returns the TYPEKIND enumeration quickly, without doing any allocations. |
GetTypeFlags | Returns the TYPEFLAGS quickly, without doing any allocations. | |
GetFuncIndexOfMemId | Binds to a specific member based on a known dispatch identifier (DISPID) | |
GetVarIndexOfMemId | Binds to a specific member based on a known DISPID. | |
GetCustData | Gets the custom data. | |
GetAllCustData | Gets all custom data items for the library. | |
GetFuncCustData | Gets the custom data from the specified function. | |
GetAllFuncCustData | Gets all of the custom data from the specified function. | |
GetParamCustData | Gets the specified custom data parameter. | |
GetAllParamCustData | Gets all of the custom data for the specified parameter. | |
GetVarCustData | Gets the variable for the custom data. | |
GetAllVarCustData | Gets all of the custom data for the specified variable. | |
GetImplTypeCustData | Gets the implementation type of the custom data. | |
GetAllImplTypeCustData | Gets all of the custom data for the specified implementation type. | |
GetDocumentation2 | Retrieves the documentation string and other Help related information. | |
ITypeComp | Bind | Maps a name to a member of a type, or binds global variables and functions contained in a type library. |
BindType | Binds to the type descriptions contained within a type library. |