RegistrationServices.RegisterTypeForComClients メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した型を COM に登録します。
オーバーロード
RegisterTypeForComClients(Type, Guid) |
GUID を使用して、指定した型を COM に登録します。 |
RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType) |
指定した実行コンテキストと接続の種類を使用して、指定した型を COM に登録します。 |
注釈
プラットフォーム呼び出しを使用して、COM オブジェクトの登録と登録解除のためにアンマネージド CoRegisterClassObject
メソッドと CoDisconnectObject
メソッドを呼び出す方法はサポートされていないことに注意してください。
RegisterTypeForComClients(Type, Guid)
GUID を使用して、指定した型を COM に登録します。
public:
virtual void RegisterTypeForComClients(Type ^ type, Guid % g);
public virtual void RegisterTypeForComClients (Type type, ref Guid g);
[System.Security.SecurityCritical]
public virtual void RegisterTypeForComClients (Type type, ref Guid g);
abstract member RegisterTypeForComClients : Type * Guid -> unit
override this.RegisterTypeForComClients : Type * Guid -> unit
[<System.Security.SecurityCritical>]
abstract member RegisterTypeForComClients : Type * Guid -> unit
override this.RegisterTypeForComClients : Type * Guid -> unit
Public Overridable Sub RegisterTypeForComClients (type As Type, ByRef g As Guid)
パラメーター
実装
- 属性
例外
type
パラメーターが null
です。
type
パラメーターを作成できません。
注釈
このメソッドは、COM で を呼び出すこと CoRegisterClassObject
と同じです。 メソッドは RegisterTypeForComClients アトミックではなく、マルチスレッド コンテキストで使用すると予測できない結果を引き起こす可能性があります。
バージョン 2.0 以降では、 メソッドを UnregisterTypeForComClients 使用して COM の型の登録を解除します。
プラットフォーム呼び出しを使用して、COM オブジェクトの登録と登録解除のためにアンマネージド CoRegisterClassObject
メソッドと CoDisconnectObject
メソッドを呼び出す方法はサポートされていないことに注意してください。
こちらもご覧ください
適用対象
RegisterTypeForComClients(Type, RegistrationClassContext, RegistrationConnectionType)
指定した実行コンテキストと接続の種類を使用して、指定した型を COM に登録します。
public:
virtual int RegisterTypeForComClients(Type ^ type, System::Runtime::InteropServices::RegistrationClassContext classContext, System::Runtime::InteropServices::RegistrationConnectionType flags);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual int RegisterTypeForComClients (Type type, System.Runtime.InteropServices.RegistrationClassContext classContext, System.Runtime.InteropServices.RegistrationConnectionType flags);
[System.Runtime.InteropServices.ComVisible(false)]
[System.Security.SecurityCritical]
public virtual int RegisterTypeForComClients (Type type, System.Runtime.InteropServices.RegistrationClassContext classContext, System.Runtime.InteropServices.RegistrationConnectionType flags);
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member RegisterTypeForComClients : Type * System.Runtime.InteropServices.RegistrationClassContext * System.Runtime.InteropServices.RegistrationConnectionType -> int
override this.RegisterTypeForComClients : Type * System.Runtime.InteropServices.RegistrationClassContext * System.Runtime.InteropServices.RegistrationConnectionType -> int
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Security.SecurityCritical>]
abstract member RegisterTypeForComClients : Type * System.Runtime.InteropServices.RegistrationClassContext * System.Runtime.InteropServices.RegistrationConnectionType -> int
override this.RegisterTypeForComClients : Type * System.Runtime.InteropServices.RegistrationClassContext * System.Runtime.InteropServices.RegistrationConnectionType -> int
Public Overridable Function RegisterTypeForComClients (type As Type, classContext As RegistrationClassContext, flags As RegistrationConnectionType) As Integer
パラメーター
- classContext
- RegistrationClassContext
実行可能コードを実行するコンテキストを示す RegistrationClassContext 値の 1 つ。
クラス オブジェクトとの接続方法を指定する RegistrationConnectionType 値の 1 つ。
戻り値
クッキー値を表す整数。
- 属性
例外
type
パラメーターが null
です。
type
パラメーターを作成できません。
注釈
このメソッドは、COM で を呼び出すこと CoRegisterClassObject
と同じです。 メソッドは RegisterTypeForComClients アトミックではなく、マルチスレッド コンテキストで使用すると予測できない結果を引き起こす可能性があります。
.NET Framework バージョン 2.0 以降では、 メソッドを UnregisterTypeForComClients 使用して COM の型の登録を解除します。
プラットフォーム呼び出しを使用して、COM オブジェクトの登録と登録解除のためにアンマネージド CoRegisterClassObject
メソッドと CoDisconnectObject
メソッドを呼び出す方法はサポートされていないことに注意してください。
適用対象
.NET