IDispatchImplAttribute 類別

定義

警告

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

指示在顯露雙重介面 (Dual Interface) 和 COM 的分配介面 (Dispinterface) 時,Common Language Runtime 使用哪個 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 Common Language Runtime 會提供實作。 將屬性設定為 可 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)
已淘汰.

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。

(繼承來源 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)
已淘汰.

擷取物件的類型資訊,可以用來取得介面的類型資訊。

(繼承來源 Attribute)
_Attribute.GetTypeInfoCount(UInt32)
已淘汰.

擷取物件提供的類型資訊介面數目 (0 或 1)。

(繼承來源 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
已淘汰.

提供物件所公開的屬性和方法的存取權。

(繼承來源 Attribute)

適用於

另請參閱