RegistrationServices.RegisterAssembly メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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
登録するアセンブリ。
assembly登録時に使用される特別な設定を示すAssemblyRegistrationFlags値。
返品
true
assemblyに正常に登録された型が含まれている場合は。それ以外の場合は、アセンブリに対象となる型が含まれていない場合にfalse。
実装
- 属性
例外
assembly は nullです。
assemblyの完全な名前はnull。
-または-
ComRegisterFunctionAttributeでマークされたメソッドはstaticされません。
-または-
階層の特定のレベルで ComRegisterFunctionAttribute でマークされた複数のメソッドがあります。
-または-
ComRegisterFunctionAttributeでマークされたメソッドのシグネチャが無効です。
ユーザー定義のカスタム登録関数 ( ComRegisterFunctionAttribute 属性でマーク) は例外をスローします。
注釈
RegisterAssembly は、指定したアセンブリ内の型に適切なレジストリ エントリを追加します。 このメソッドは、アセンブリで見つかった登録関数も呼び出します。
アセンブリを取得するには、 Assembly.Load を使用します。