Export (0) Print
Expand All
Expand Minimize

Marshal.Prelink Method

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

Namespace:  System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

static member Prelink : 
        m:MethodInfo -> unit 

Parameters

m
Type: System.Reflection.MethodInfo
The method to be checked.

ExceptionCondition
ArgumentNullException

The m parameter is a null reference (Nothing in Visual Basic).

ArgumentException

The m parameter is not a MethodInfo object.

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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

  • SecurityCriticalAttribute 

    requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2015 Microsoft