RegistrationServices.RegisterTypeForComClients メソッド

定義

指定した型を 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
Type

COM から使用するために登録する Type

g
Guid

指定した型の登録に使用する 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

パラメーター

type
Type

COM から使用するために登録する Type オブジェクト。

classContext
RegistrationClassContext

実行可能コードを実行するコンテキストを示す RegistrationClassContext 値の 1 つ。

flags
RegistrationConnectionType

クラス オブジェクトとの接続方法を指定する RegistrationConnectionType 値の 1 つ。

戻り値

クッキー値を表す整数。

属性

例外

type パラメーターが null です。

type パラメーターを作成できません。

注釈

このメソッドは、COM で を呼び出すこと CoRegisterClassObject と同じです。 メソッドは RegisterTypeForComClients アトミックではなく、マルチスレッド コンテキストで使用すると予期しない結果を引き起こす可能性があります。

.NET Framework バージョン 2.0 以降では、 メソッドをUnregisterTypeForComClients使用して COM の型の登録を解除します。

COM オブジェクトの登録と登録解除のために、プラットフォーム呼び出しを使用してアンマネージ CoRegisterClassObject メソッドと CoDisconnectObject メソッドを呼び出す方法はサポートされていないことに注意してください。

適用対象