Identifies the type of class interface that is generated for a class.
[Visual Basic] <Serializable> Public Enum ClassInterfaceType [C#] [Serializable] public enum ClassInterfaceType [C++] [Serializable] __value public enum ClassInterfaceType [JScript] public Serializable enum ClassInterfaceType
This enumeration is used in conjunction with the ClassInterfaceAttribute.
|AutoDispatch||Indicates that the class only supports late binding for COM clients. A dispinterface for the class is automatically exposed to COM clients on request. The type library produced by the type Type Library Exporter (Tlbexp.exe) does not contain type information for the dispinterface in order to prevent clients from caching the DISPIDs of the interface. The dispinterface does not exhibit the versioning problems described in ClassInterfaceAttribute because clients can only late bind to the interface.
This is the default setting for ClassInterfaceAttribute.
|AutoDual||Indicates that a dual class interface is automatically generated for the class and exposed to COM. Type information is produced for the class interface and published in the type library. Using AutoDual is strongly discouraged because of the versioning limitations described in ClassInterfaceAttribute.|
|None||Indicates that no class interface is generated for the class. If no interfaces are implemented explicitly, the class can only provide late bound access through the IDispatch interface. This is the recommended setting for ClassInterfaceAttribute. Using ClassInterfaceType.None is the only way to expose functionality through interfaces implemented explicitly by the class.
The Type Library Exporter (Tlbexp.exe) exposes the first public, COM-visible interface implemented by the class as the default interface of the coclass. If the class implements no interfaces, the first public, COM-visible interface implemented by a base class becomes the default interface (starting with the most recently derived base class and working backward). Tlbexp.exe exposes _Object as the default interface if neither the class nor its base classes implement interfaces.
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)