DisableRuntimeMarshallingAttribute 類別

定義

停用 P/Invokes、委派類型和 Unmanaged 函式指標調用的內建執行時間 Managed/Unmanaged 封送處理子系統。

public ref class DisableRuntimeMarshallingAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
public sealed class DisableRuntimeMarshallingAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)>]
type DisableRuntimeMarshallingAttribute = class
    inherit Attribute
Public NotInheritable Class DisableRuntimeMarshallingAttribute
Inherits Attribute
繼承
DisableRuntimeMarshallingAttribute
屬性

備註

內建封送處理子系統有一些行為,因為回溯相容性需求而無法變更。 此屬性允許停用內建子系統,並改為針對 P/Invokes、Delegates 和 Unmanaged 函式指標調用使用下列規則:

  • C#) unmanaged 中遞迴 (不包含參考型別欄位的所有實數值型別都是 blittable。
  • 以遞迴方式具有不允許 Interop 的任何欄位 [StructLayout(LayoutKind.Auto)] 的實值型別。
  • Interop 案例中不允許使用所有參考類型。
  • P/Invokes 中的 SetLastError 支援已停用。
  • varargs 支援已停用。
  • LCIDConversionAttribute 支援已停用。

建構函式

DisableRuntimeMarshallingAttribute()

使用預設值初始化 DisableRuntimeMarshallingAttribute 實例。

屬性

TypeId

在衍生類別中實作時,取得這個 Attribute 的唯一識別碼。

(繼承來源 Attribute)

方法

Equals(Object)

傳回值,這個值指出此執行個體是否與指定的物件相等。

(繼承來源 Attribute)
GetHashCode()

傳回這個執行個體的雜湊碼。

(繼承來源 Attribute)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
IsDefaultAttribute()

在衍生類別中覆寫時,表示這個執行個體的值是衍生類別的預設值。

(繼承來源 Attribute)
Match(Object)

在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。

(繼承來源 Attribute)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於