Marshal.GetManagedThunkForUnmanagedMethodPtr(IntPtr, IntPtr, Int32) Method

Definition

Caution

The GetManagedThunkForUnmanagedMethodPtr method has been deprecated and will be removed in a future release.

Gets a pointer to a runtime-generated function that marshals a call from managed to unmanaged code.

C#
public static IntPtr GetManagedThunkForUnmanagedMethodPtr(IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature);
C#
[System.Obsolete("The GetManagedThunkForUnmanagedMethodPtr method has been deprecated and will be removed in a future release.", false)]
public static IntPtr GetManagedThunkForUnmanagedMethodPtr(IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature);
C#
[System.Obsolete("The GetManagedThunkForUnmanagedMethodPtr method has been deprecated and will be removed in a future release.", false)]
[System.Security.SecurityCritical]
public static IntPtr GetManagedThunkForUnmanagedMethodPtr(IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature);

Parameters

pfnMethodToWrap
IntPtr

A pointer to the method to marshal.

pbSignature
IntPtr

A pointer to the method signature.

cbSignature
Int32

The number of bytes in pbSignature.

Returns

IntPtr

A pointer to the function that will marshal a call from the pfnMethodToWrap parameter to unmanaged code.

Attributes

Remarks

GetManagedThunkForUnmanagedMethodPtr is exposed for compiler support only.

Applies to

Product Versions (Obsolete)
.NET Framework 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)