Marshal.GetTypeLibGuidForAssembly(Assembly) メソッド

定義

指定したアセンブリからエクスポートされたときにタイプ ライブラリに割り当てられたライブラリ識別子 (LIBID) を取得します。

public:
 static Guid GetTypeLibGuidForAssembly(System::Reflection::Assembly ^ asm);
public static Guid GetTypeLibGuidForAssembly(System.Reflection.Assembly asm);
[System.Security.SecurityCritical]
public static Guid GetTypeLibGuidForAssembly(System.Reflection.Assembly asm);
static member GetTypeLibGuidForAssembly : System.Reflection.Assembly -> Guid
[<System.Security.SecurityCritical>]
static member GetTypeLibGuidForAssembly : System.Reflection.Assembly -> Guid
Public Shared Function GetTypeLibGuidForAssembly (asm As Assembly) As Guid

パラメーター

asm
Assembly

タイプ ライブラリのエクスポート元のアセンブリ。

返品

タイプ ライブラリが指定したアセンブリからエクスポートされるときに割り当てられる、この型ライブラリ。

属性

例外

asmnullです。

注釈

アセンブリをタイプ ライブラリにエクスポートすると、タイプ ライブラリには、そのタイプ ライブラリに、次のようにアクセスできます。 アセンブリ レベルで System.Runtime.InteropServices.GuidAttribute を適用して、EXPLICIT を明示的に設定することも、自動的に生成することもできます。 Tlbimp.exe (タイプ ライブラリ インポーター) ツールは、アセンブリの ID に基づいて、この値を計算します。 GetTypeLibGuid は、属性が適用されている場合、 GuidAttributeに関連付けられているリビドを返します。 それ以外の場合、 GetTypeLibGuidForAssembly は計算値を返します。 または、 GetTypeLibGuid メソッドを使用して、既存のタイプ ライブラリから実際のリビドを抽出することもできます。

適用対象

こちらもご覧ください