Table of Contents

Method CreateNativeToManagedHelper

Namespace
MonoMod.Core.Platforms
Assembly
MonoMod.Core.dll

CreateNativeToManagedHelper(nint, out IDisposable?)

Creates a native to managed thunk for this exception helper.
nint CreateNativeToManagedHelper(nint target, out IDisposable? handle)

Parameters

target nint
The function pointer for the generated thunk to call. This is usually the result of GetFunctionPointerForDelegate(Delegate).
handle IDisposable
A handle to any memory allocations made for the thunk. This must be kept alive as long as the returned pointer is in use.

Returns

nint
A pointer to the thunk to pass to native code to call instead of target.