Method CreateNativeDetour
CreateNativeDetour(IDetourFactory, nint, nint, bool)
Creates a native detour from
source
to target
.public static ICoreNativeDetour CreateNativeDetour(this IDetourFactory factory, nint source, nint target, bool applyByDefault = true)
Parameters
factory
IDetourFactory- The IDetourFactory to use to perform the operation.
source
nint- The source function for the detour.
target
nint- The target function for the detour.
applyByDefault
bool- true if the detour should be applied when this method returns; false if the caller must apply it themselves.
Returns
- ICoreNativeDetour
- The created ICoreNativeDetour.