Method CreateSimpleDetour
CreateSimpleDetour(nint, nint, int, nint)
Creates and applies a SimpleNativeDetour from one address to another.
public SimpleNativeDetour CreateSimpleDetour(nint from, nint to, int detourMaxSize = -1, nint fromRw = 0)
Parameters
from
nint- The address to detour.
to
nint- The target of the detour.
detourMaxSize
int- The maximum size available for the detour.
fromRw
nint- 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
- SimpleNativeDetour
- A SimpleNativeDetour instance managing the generated detour.