語言

Marshal.Prelink(MethodInfo) 方法

定義

執行一次性方法設定任務,無需呼叫該方法。

public:
 static void Prelink(System::Reflection::MethodInfo ^ m);
public static void Prelink(System.Reflection.MethodInfo m);
[System.Security.SecurityCritical]
public static void Prelink(System.Reflection.MethodInfo m);
static member Prelink : System.Reflection.MethodInfo -> unit
[<System.Security.SecurityCritical>]
static member Prelink : System.Reflection.MethodInfo -> unit
Public Shared Sub Prelink (m As MethodInfo)

參數

m
MethodInfo

方法需要檢查。

屬性

例外狀況

參數 m 為 null。

參數 m 不是 MethodInfo 物件。

備註

設定任務提供早期初始化,並在目標方法被呼叫時自動執行。 首次任務包括以下內容:

  • 確認平台調用的元資料格式正確。

  • 驗證所有受管理型別都是平台調用函式的有效參數。

  • 定位並載入未管理的 DLL 進程。

  • 找出過程中的切入點。

呼叫 Prelink 平台 invoke 以外的方法不會有效果。 要在所有平台上執行設定任務,請使用 Marshal.PrelinkAll某個類型的呼叫方法。

適用於

另請參閱