System.Runtime.InteropServices.IDispatchImplAttribute Class

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

See Also: IDispatchImplAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.All, Inherited=false)]
[System.Obsolete]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class IDispatchImplAttribute : Attribute

Remarks

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 IDispatchImplType.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 IDispatchImplType.InternalImpl, the IDispatch implementation is supplied by the common language runtime. Setting the attribute to IDispatchImplType.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.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0