LibraryImportAttribute 類別

定義

表示來源產生器應該建立函式來封送自變數,而不是依賴運行時間在運行時間產生對等封送處理函式。

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

備註

如果未啟用與此屬性相關聯的來源產生器,這個屬性就無意義。

目前的內建來源產生器僅支援 C#,而且只會在套用至靜態、部分、非泛型方法時提供實作。

建構函式

LibraryImportAttribute(String)

初始化 LibraryImportAttribute 的新執行個體。

屬性

EntryPoint

取得或設定要呼叫之進入點的名稱。

LibraryName

取得包含匯入的連結庫名稱。

SetLastError

取得或設定值,這個值會指定被呼叫者在 Windows 或其他errno平台上設定錯誤 (SetLastError) ,然後再從屬性化方法傳回。

StringMarshalling

取得或設定 物件,指定如何將字串自變數封送處理至 方法。

StringMarshallingCustomType

取得或設定 Type ,用來控制如何封送處理方法的字串自變數。

TypeId

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

(繼承來源 Attribute)

方法

Equals(Object)

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

(繼承來源 Attribute)
GetHashCode()

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

(繼承來源 Attribute)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
IsDefaultAttribute()

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

(繼承來源 Attribute)
Match(Object)

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

(繼承來源 Attribute)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

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

(繼承來源 Object)

適用於