Marshal.GetTypeLibGuid 方法

定义

检索类型库的库标识符 (LIBID)。Retrieves the library identifier (LIBID) of a type library.

重载

GetTypeLibGuid(ITypeLib)

检索类型库的库标识符 (LIBID)。Retrieves the library identifier (LIBID) of a type library.

GetTypeLibGuid(UCOMITypeLib)
已过时。
已过时。

检索类型库的库标识符 (LIBID)。Retrieves the library identifier (LIBID) of a type library.

GetTypeLibGuid(ITypeLib)

检索类型库的库标识符 (LIBID)。Retrieves the library identifier (LIBID) of a type library.

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

参数

typelib
ITypeLib

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

返回

Guid

指定类型库的 LIBID。The LIBID of the specified type library.

属性

注解

GetTypeLibGuid 直接从现有类型库中提取 LIBID。GetTypeLibGuid extracts the LIBID directly from an existing type library. 此操作与方法的不同之处在于 Marshal.GetTypeLibGuidForAssembly ,它计算 LIBID 应基于当前程序集的内容。This action differs from that of the Marshal.GetTypeLibGuidForAssembly method, which calculates what the LIBID should be based on the current assembly.

有关库标识符的详细信息,请参阅 导出的程序集转换For more information about library identifiers, see Exported Assembly Conversion.

另请参阅

适用于

GetTypeLibGuid(UCOMITypeLib)

注意

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

注意

此 API 现已过时。

检索类型库的库标识符 (LIBID)。Retrieves the library identifier (LIBID) of a type library.

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

参数

pTLB
UCOMITypeLib

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

返回

Guid

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

属性

注解

GetTypeLibGuid 直接从现有类型库中提取 LIBID。GetTypeLibGuid extracts the LIBID directly from an existing type library. 此操作与方法的不同之处在于 Marshal.GetTypeLibGuidForAssembly ,它计算 LIBID 应基于当前程序集的内容。This action differs from that of the Marshal.GetTypeLibGuidForAssembly method, which calculates what the LIBID should be based on the current assembly.

有关库标识符的详细信息,请参阅 导出的程序集转换For more information about library identifiers, see Exported Assembly Conversion.

另请参阅

适用于