Method CreateNativeDetour
CreateNativeDetour(nint, nint, int, nint)
Creates a PlatformTriple.NativeDetour. This is basically identical to CreateSimpleDetour(nint, nint, int, nint),
except that it generates an alternate entrypoint for
from.[SuppressMessage("Reliability", "CA2000:Dispose objects before losing scope", Justification = "allocHandle is correctly transferred around, as needed")]
public PlatformTriple.NativeDetour CreateNativeDetour(nint from, nint to, int detourMaxSize = -1, nint fromRw = 0)
Parameters
fromnint- The address to detour.
tonint- The target of the detour.
detourMaxSizeint- The maximum size available for the detour.
fromRwnint- The address to write the detour to, if that is different from
from. Otherwise, the default value of default should be passed. Refer to OnMethodCompiledCallback for more information.
Returns
- PlatformTriple.NativeDetour
- A PlatformTriple.NativeDetour instance managing the generated detour.
Remarks
This method will always create an alternate entrypoint in AltEntry when CreateAltEntryPoint
is available.