System.Runtime.InteropServices.Marshal.Prelink Method

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

Syntax

public static void Prelink (System.Reflection.MethodInfo m)

Parameters

m
The method to be checked.

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 Marshal.Prelink(System.Reflection.MethodInfo) 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(Type).

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0