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

assembly を登録する場合に特に必要な設定を示す AssemblyRegistrationFlags 値。

戻り値

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

属性

例外

assemblynullです。

assembly の完全名が null です。

- または -

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

- または -

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

- または -

ComRegisterFunctionAttribute でマークされたメソッドのシグネチャが有効ではありません。

注釈

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

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

適用対象