次の方法で共有


IDispatchImplAttribute クラス

COM にデュアル インターフェイスと Dispinterface を公開する場合に、共通言語ランタイムが使用する IDispatch 実装を指定します。

この型のすべてのメンバの一覧については、IDispatchImplAttribute メンバ を参照してください。

System.Object
   System.Attribute
      System.Runtime.InteropServices.IDispatchImplAttribute

<AttributeUsage(AttributeTargets.Assembly Or _
   AttributeTargets.Class)>
NotInheritable Public Class IDispatchImplAttribute   Inherits Attribute
[C#]
[AttributeUsage(AttributeTargets.Assembly |
   AttributeTargets.Class)]
public sealed class IDispatchImplAttribute : Attribute
[C++]
[AttributeUsage(AttributeTargets::Assembly |
   AttributeTargets::Class)]
public __gc __sealed class IDispatchImplAttribute : public   Attribute
[JScript]
public
   AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class)
class IDispatchImplAttribute extends Attribute

スレッドセーフ

この型の public static (Visual Basicでは Shared) のすべてのメンバは、マルチスレッド操作で安全に使用できます。インスタンスのメンバの場合は、スレッドセーフであるとは限りません。

解説

この属性は、クラスまたはアセンブリに適用できます。

この属性は、明示的な実装が必要な場合にだけ設定してくださいこの属性を CompatibleImpl に設定する場合、 IDispatch 実装は、オブジェクトの型情報を COM の CreateStdDispatch API に渡すことによって提供されます。この属性を InternalImpl に設定する場合、 IDispatch 実装は共通言語ランタイムによって提供されます。この属性を SystemDefinedImpl に設定すると、ランタイムは適切な実装を使用できます。アセンブリでこの属性を使用する場合、この属性はそのアセンブリで定義されたすべてのクラスに適用されます。それぞれのクラスで属性を使用する場合、その属性は、そのクラスによって公開されるインターフェイスだけに適用され、アセンブリ レベルの設定をオーバーライドします。

必要条件

名前空間: System.Runtime.InteropServices

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

アセンブリ: Mscorlib (Mscorlib.dll 内)

参照

IDispatchImplAttribute メンバ | System.Runtime.InteropServices 名前空間 | IDispatchImplType