Table of Contents

Method ChangeTarget

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

ChangeTarget(nint)

Changes the target of this detour to newTarget.,
public void ChangeTarget(nint newTarget)

Parameters

newTarget nint
The new target of the detour.

Remarks

If this SimpleNativeDetour was created as a result of CreateNativeDetour(nint, nint, int, nint), then it is not safe to use this method. Because this method may enlarge the detour, it would need to fix up the generated alt entrypoint too, which is not currently supported. Refer to CreateAlternateEntrypoint(nint, int, out IDisposable?) for more information.
See Also