Marshal.GetUnmanagedThunkForManagedMethodPtr(IntPtr, IntPtr, Int32) Method

Definition

Caution

The GetUnmanagedThunkForManagedMethodPtr 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 unmanaged to managed code.

C#
public static IntPtr GetUnmanagedThunkForManagedMethodPtr(IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature);
C#
[System.Obsolete("The GetUnmanagedThunkForManagedMethodPtr method has been deprecated and will be removed in a future release.", false)]
public static IntPtr GetUnmanagedThunkForManagedMethodPtr(IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature);
C#
[System.Obsolete("The GetUnmanagedThunkForManagedMethodPtr method has been deprecated and will be removed in a future release.", false)]
[System.Security.SecurityCritical]
public static IntPtr GetUnmanagedThunkForManagedMethodPtr(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 a function that will marshal a call from pfnMethodToWrap to managed code.

Attributes

Remarks

GetUnmanagedThunkForManagedMethodPtr 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)