IDispatchImplAttribute Class
Collapse the table of content
Expand the table of content

IDispatchImplAttribute Class

Indicates which IDispatch implementation the common language runtime uses when exposing dual interfaces and dispinterfaces to COM.

For a list of all members of this type, see IDispatchImplAttribute Members.


[Visual Basic]
<AttributeUsage(AttributeTargets.Assembly Or _
NotInheritable Public Class IDispatchImplAttribute
   Inherits Attribute
[AttributeUsage(AttributeTargets.Assembly |
public sealed class IDispatchImplAttribute : Attribute
[AttributeUsage(AttributeTargets::Assembly |
public __gc __sealed class IDispatchImplAttribute : public
   AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class)
class IDispatchImplAttribute extends Attribute

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


You can apply this attribute to classes or assemblies.

This attribute should only be set when an explicit implementation is required. When you set the attribute to CompatibleImpl, the IDispatch implementation is supplied by passing the type information for the object to COM's CreateStdDispatch API. When you set the attribute to InternalImpl, the IDispatch implementation is supplied by the common language runtime. Setting the attribute to SystemDefinedImpl allows the runtime to choose the appropriate implementation. When using the attribute on an assembly, the attribute applies to all classes defined within the assembly. When using the attribute on an individual class, the attribute applies only to the interfaces exposed by that class and overrides any assembly-level setting.


Namespace: System.Runtime.InteropServices

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

IDispatchImplAttribute Members | System.Runtime.InteropServices Namespace | IDispatchImplType

© 2015 Microsoft