ComInterfaceType ComInterfaceType ComInterfaceType ComInterfaceType Enum


标识如何向 COM 公开接口。Identifies how to expose an interface to COM.

public enum class ComInterfaceType
public enum ComInterfaceType
type ComInterfaceType = 
Public Enum ComInterfaceType


InterfaceIsDual InterfaceIsDual InterfaceIsDual InterfaceIsDual 0

指示接口作为双重接口对 COM 公开,从而启用早期绑定和后期绑定。Indicates that the interface is exposed to COM as a dual interface, which enables both early and late binding. 默认值为 InterfaceIsDualInterfaceIsDual is the default value.

InterfaceIsIDispatch InterfaceIsIDispatch InterfaceIsIDispatch InterfaceIsIDispatch 2

指示接口作为 dispinterface 对 COM 公开,这样将只启用后期绑定。Indicates that an interface is exposed to COM as a dispinterface, which enables late binding only.

InterfaceIsIInspectable InterfaceIsIInspectable InterfaceIsIInspectable InterfaceIsIInspectable 3

指示接口作为 Windows 运行时Windows Runtime 接口对 COM 公开。Indicates that an interface is exposed to COM as a Windows 运行时Windows Runtime interface.

InterfaceIsIUnknown InterfaceIsIUnknown InterfaceIsIUnknown InterfaceIsIUnknown 1

指示接口作为从 IUnknown 派生的接口对 COM 公开,这样将只启用早期绑定。Indicates that an interface is exposed to COM as an interface that is derived from IUnknown, which enables only early binding.


此枚举与InterfaceTypeAttribute属性一起使用。This enumeration works in conjunction with the InterfaceTypeAttribute attribute.