Marshal.Prelink(MethodInfo) Method

Definition

Executes one-time method setup tasks without calling the method.

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)

Parameters

m
MethodInfo

The method to be checked.

Attributes

Exceptions

The m parameter is null.

The m parameter is not a MethodInfo object.

Remarks

Setup tasks provide early initialization and are performed automatically when the target method is invoked. First-time tasks include the following:

  • Verifying that the platform invoke metadata is correctly formatted.

  • Verifying that all the managed types are valid parameters of platform invoke functions.

  • Locating and loading the unmanaged DLL into the process.

  • Locating the entry point in the process.

Calling Prelink on a method outside of platform invoke has no effect. To execute setup tasks on all platform invoke methods in a type, use Marshal.PrelinkAll.

Applies to

See also