言語

IRegistrationServices.RegisterAssembly メソッド

定義

COM からの作成を有効にするために、マネージド アセンブリにクラスを登録します。

public:
 bool RegisterAssembly(System::Reflection::Assembly ^ assembly, System::Runtime::InteropServices::AssemblyRegistrationFlags flags);
public bool RegisterAssembly(System.Reflection.Assembly assembly, System.Runtime.InteropServices.AssemblyRegistrationFlags flags);
[System.Security.SecurityCritical]
public bool RegisterAssembly(System.Reflection.Assembly assembly, System.Runtime.InteropServices.AssemblyRegistrationFlags flags);
abstract member RegisterAssembly : System.Reflection.Assembly * System.Runtime.InteropServices.AssemblyRegistrationFlags -> bool
[<System.Security.SecurityCritical>]
abstract member RegisterAssembly : System.Reflection.Assembly * System.Runtime.InteropServices.AssemblyRegistrationFlags -> bool
Public Function RegisterAssembly (assembly As Assembly, flags As AssemblyRegistrationFlags) As Boolean

パラメーター

assembly
Assembly

登録するアセンブリ。

flags
AssemblyRegistrationFlags

AssemblyRegistrationFlagsの登録時に必要な特別な設定を示すassembly値。

返品

true assemblyに正常に登録された型が含まれている場合は。それ以外の場合は、アセンブリに対象となる型が含まれていない場合にfalse

属性

例外

assemblynullです。

assemblyの完全な名前はnull

-又は-

ComRegisterFunctionAttributeでマークされたメソッドはstaticされません。

-又は-

階層の特定のレベルで ComRegisterFunctionAttribute でマークされた複数のメソッドがあります。

-又は-

ComRegisterFunctionAttributeでマークされたメソッドのシグネチャが無効です。

注釈

RegisterAssembly は、指定したアセンブリ内の型に適切なレジストリ エントリを追加します。 このメソッドは、アセンブリで見つかった登録関数も呼び出します。

アセンブリを取得するには、 Assembly.Load を使用します。

適用対象