IDispatchImplAttribute 类

定义

注意

This attribute is deprecated and will be removed in a future version.

指示当向 COM 公开双重接口和调度接口时公共语言运行时使用何种 IDispatch 实现。

public ref class IDispatchImplAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, Inherited=false)]
public sealed class IDispatchImplAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, Inherited=false)]
[System.Obsolete("This attribute is deprecated and will be removed in a future version.", false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class IDispatchImplAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, Inherited=false)>]
type IDispatchImplAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, Inherited=false)>]
[<System.Obsolete("This attribute is deprecated and will be removed in a future version.", false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type IDispatchImplAttribute = class
    inherit Attribute
Public NotInheritable Class IDispatchImplAttribute
Inherits Attribute
继承
IDispatchImplAttribute
属性

注解

可以将此属性应用于类或程序集。

仅当需要显式实现时,才应设置此属性。 将 属性设置为 CompatibleImpl时, IDispatch 通过将 对象的类型信息传递给 COM 的 CreateStdDispatch API 来提供实现。 将 属性设置为 InternalImpl时, IDispatch 实现由公共语言运行时提供。 将 属性设置为 SystemDefinedImpl 允许运行时选择适当的实现。 在程序集上使用 特性时,该特性将应用于程序集中定义的所有类。 在单个类上使用 特性时, 特性仅适用于该类公开的接口,并替代任何程序集级设置。

构造函数

IDispatchImplAttribute(IDispatchImplType)
已过时.

使用指定的 IDispatchImplType 值初始化 IDispatchImplAttribute 类的新实例。

IDispatchImplAttribute(Int16)
已过时.

使用指定的 IDispatchImplType 值初始化 IDispatchImplAttribute 类的新实例。

属性

TypeId
已过时.

在派生类中实现时,获取此 Attribute 的唯一标识符。

(继承自 Attribute)
Value
已过时.

获取由类使用的 IDispatchImplType 值。

方法

Equals(Object)
已过时.

返回一个值,该值指示此实例是否与指定的对象相等。

(继承自 Attribute)
GetHashCode()
已过时.

返回此实例的哈希代码。

(继承自 Attribute)
GetType()
已过时.

获取当前实例的 Type

(继承自 Object)
IsDefaultAttribute()
已过时.

在派生类中重写时,指示此实例的值是否是派生类的默认值。

(继承自 Attribute)
Match(Object)
已过时.

当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。

(继承自 Attribute)
MemberwiseClone()
已过时.

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()
已过时.

返回表示当前对象的字符串。

(继承自 Object)

显式接口实现

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)
已过时.

将一组名称映射为对应的一组调度标识符。

(继承自 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)
已过时.

检索对象的类型信息,然后可以使用该信息获取接口的类型信息。

(继承自 Attribute)
_Attribute.GetTypeInfoCount(UInt32)
已过时.

检索对象提供的类型信息接口的数量(0 或 1)。

(继承自 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
已过时.

提供对某一对象公开的属性和方法的访问。

(继承自 Attribute)

适用于

另请参阅