ITypeLib 接口


提供 ITypeLib 接口的托管定义。Provides the managed definition of the ITypeLib interface.

public interface class ITypeLib
public interface ITypeLib
public interface ITypeLib
public interface ITypeLib
type ITypeLib = interface
Public Interface ITypeLib


有关 ITypeLib 接口的其他信息,请参阅 MSDN Library。For additional information about the ITypeLib interface, see the MSDN Library.

当本机代码中的 COM 方法返回 HRESULT 时,公共语言运行时将引发异常。The common language runtime throws an exception when a COM method in native code returns an HRESULT. 有关更多信息,请参见 How to: Map HRESULTs and ExceptionsFor more information, see How to: Map HRESULTs and Exceptions.


FindName(String, Int32, ITypeInfo[], Int32[], Int16)

在类型库中查找类型说明的匹配项。Finds occurrences of a type description in a type library.

GetDocumentation(Int32, String, String, Int32, String)

检索库的文档字符串、完整的帮助文件名和路径以及帮助文件中的库帮助主题的上下文标识符。Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file.


检索包含库的特性的结构。Retrieves the structure that contains the library's attributes.


使客户端编译器能够绑定到库的类型、变量、常数和全局函数。Enables a client compiler to bind to a library's types, variables, constants, and global functions.

GetTypeInfo(Int32, ITypeInfo)

在库中检索指定的类型说明。Retrieves the specified type description in the library.


返回类型库中的类型说明的数量。Returns the number of type descriptions in the type library.

GetTypeInfoOfGuid(Guid, ITypeInfo)

检索与指定的 GUID 相对应的类型说明。Retrieves the type description that corresponds to the specified GUID.

GetTypeInfoType(Int32, TYPEKIND)

检索类型说明的类型。Retrieves the type of a type description.

IsName(String, Int32)

指示传入的字符串是否包含库中描述的类型或成员的名称。Indicates whether a passed-in string contains the name of a type or member described in the library.


释放最初通过 TYPELIBATTR 方法获取的 GetLibAttr(IntPtr) 结构。Releases the TYPELIBATTR structure originally obtained from the GetLibAttr(IntPtr) method.