Method ChangeTarget
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
-
GetRetargetBytes(NativeDetourInfo, NativeDetourInfo, Span<byte>, out IDisposable, out bool, out bool)