Marshal.GetTypeLibName 方法

定义

检索类型库的名称。Retrieves the name of a type library.

重载

GetTypeLibName(ITypeLib)

检索类型库的名称。Retrieves the name of a type library.

GetTypeLibName(UCOMITypeLib)
已过时。
已过时。

检索类型库的名称。Retrieves the name of a type library.

GetTypeLibName(ITypeLib)

检索类型库的名称。Retrieves the name of a type library.

public:
 static System::String ^ GetTypeLibName(System::Runtime::InteropServices::ComTypes::ITypeLib ^ typelib);
public static string GetTypeLibName (System.Runtime.InteropServices.ComTypes.ITypeLib typelib);
[System.Security.SecurityCritical]
public static string GetTypeLibName (System.Runtime.InteropServices.ComTypes.ITypeLib typelib);
static member GetTypeLibName : System.Runtime.InteropServices.ComTypes.ITypeLib -> string
[<System.Security.SecurityCritical>]
static member GetTypeLibName : System.Runtime.InteropServices.ComTypes.ITypeLib -> string
Public Shared Function GetTypeLibName (typelib As ITypeLib) As String

参数

typelib
ITypeLib

要检索其名称的类型库。The type library whose name is to be retrieved.

返回

String

typelib 参数指向的类型库的名称。The name of the type library that the typelib parameter points to.

属性

例外

typelib 参数为 nullThe typelib parameter is null.

注解

此方法返回的名称是用于库语句的标识符,如 Microsoft ADO 类型库的 ADODB.RECORDSET。The name returned by this method is the identifier used with the library statement, such as ADODB for the Microsoft ADO type library. 该名称不是文件名。The name is not a file name.

还可以通过调用方法来检索类型库的名称 UCOMITypeInfo.GetDocumentation ,并为其第一个参数传递-1。You can also retrieve the type library name by calling the UCOMITypeInfo.GetDocumentation method and passing -1 for its first parameter.

另请参阅

适用于

GetTypeLibName(UCOMITypeLib)

注意

Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.

注意

此 API 现已过时。

检索类型库的名称。Retrieves the name of a type library.

public:
 static System::String ^ GetTypeLibName(System::Runtime::InteropServices::UCOMITypeLib ^ pTLB);
public static string GetTypeLibName (System.Runtime.InteropServices.UCOMITypeLib pTLB);
[System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)]
public static string GetTypeLibName (System.Runtime.InteropServices.UCOMITypeLib pTLB);
[System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)]
[System.Security.SecurityCritical]
public static string GetTypeLibName (System.Runtime.InteropServices.UCOMITypeLib pTLB);
[System.Obsolete]
public static string GetTypeLibName (System.Runtime.InteropServices.UCOMITypeLib pTLB);
static member GetTypeLibName : System.Runtime.InteropServices.UCOMITypeLib -> string
[<System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)>]
static member GetTypeLibName : System.Runtime.InteropServices.UCOMITypeLib -> string
[<System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)>]
[<System.Security.SecurityCritical>]
static member GetTypeLibName : System.Runtime.InteropServices.UCOMITypeLib -> string
[<System.Obsolete>]
static member GetTypeLibName : System.Runtime.InteropServices.UCOMITypeLib -> string
Public Shared Function GetTypeLibName (pTLB As UCOMITypeLib) As String

参数

pTLB
UCOMITypeLib

要检索其名称的类型库。The type library whose name is to be retrieved.

返回

String

pTLB 参数指向的类型库的名称。The name of the type library that the pTLB parameter points to.

属性

注解

此方法返回的名称是用于库语句的标识符,如 Microsoft ADO 类型库的 ADODB.RECORDSET。The name returned by this method is the identifier used with the library statement, such as ADODB for the Microsoft ADO type library. 该名称不是文件名。The name is not a file name.

还可以通过调用方法来检索类型库的名称 UCOMITypeInfo.GetDocumentation ,并为其第一个参数传递-1。You can also retrieve the type library name by calling the UCOMITypeInfo.GetDocumentation method and passing -1 for its first parameter.

另请参阅

适用于