语言

Marshal.GetTypeLibName 方法

定义

检索类型库的名称。

重载

名称 说明
GetTypeLibName(ITypeLib)

检索类型库的名称。

GetTypeLibName(UCOMITypeLib)
已过时.

检索类型库的名称。

GetTypeLibName(ITypeLib)

检索类型库的名称。

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

要检索其名称的类型库。

返回

参数指向的类型库 typelib 的名称。

属性

例外

参数 typelib 为 null.

注解

此方法返回的名称是与库语句一起使用的标识符,例如用于 Microsoft ADO 类型库的 ADODB。 该名称不是文件名。

还可以通过调用 UCOMITypeInfo.GetDocumentation 方法并为其第一个参数传递 -1 来检索类型库名称。

另请参阅

适用于

GetTypeLibName(UCOMITypeLib)

注意

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

检索类型库的名称。

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);
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
Public Shared Function GetTypeLibName (pTLB As UCOMITypeLib) As String

参数

pTLB
UCOMITypeLib

要检索其名称的类型库。

返回

参数指向的类型库 pTLB 的名称。

属性

注解

此方法返回的名称是与库语句一起使用的标识符,例如用于 Microsoft ADO 类型库的 ADODB。 该名称不是文件名。

还可以通过调用 UCOMITypeInfo.GetDocumentation 方法并为其第一个参数传递 -1 来检索类型库名称。

另请参阅

适用于