RegistrationServices.RegisterAssembly メソッド

定義

マネージド アセンブリ内のクラスを登録して、COM から作成できるようにします。

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

パラメーター

assembly
Assembly

登録するアセンブリ。

flags
AssemblyRegistrationFlags

assembly を登録する場合に使用する特殊な設定を示す AssemblyRegistrationFlags 値。

戻り値

Boolean

assembly が正常に登録された型を格納している場合は true。アセンブリが適格な型を格納していない場合は false

実装

属性

例外

assemblynullです。

assembly の完全名が null です。

(ComRegisterFunctionAttribute 属性でマークされている) ユーザー定義のカスタム レジストリ関数が例外をスローしました。

注釈

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

Assembly.Load 使用してアセンブリを取得します。

適用対象