Constructor NativeHook
- Namespace
- MonoMod.RuntimeDetour
- Assembly
- MonoMod.RuntimeDetour.dll
NativeHook(nint, Delegate)
public NativeHook(nint function, Delegate hook)
Parameters
functionnint- A pointer to the native function to hook.
hookDelegate- The delegate which acts as the target of the hook.
NativeHook(nint, Delegate, DetourConfig?)
public NativeHook(nint function, Delegate hook, DetourConfig? config)
Parameters
functionnint- A pointer to the native function to hook.
hookDelegate- The delegate which acts as the target of the hook.
configDetourConfig- The DetourConfig to use for this detour.
NativeHook(nint, Delegate, bool)
public NativeHook(nint function, Delegate hook, bool applyByDefault)
Parameters
functionnint- A pointer to the native function to hook.
hookDelegate- The delegate which acts as the target of the hook.
applyByDefaultbool- Whether or not this hook should be applied when the constructor finishes.
NativeHook(nint, Delegate, DetourConfig?, bool)
public NativeHook(nint function, Delegate hook, DetourConfig? config, bool applyByDefault)
Parameters
functionnint- A pointer to the native function to hook.
hookDelegate- The delegate which acts as the target of the hook.
configDetourConfig- The DetourConfig to use for this detour.
applyByDefaultbool- Whether or not this hook should be applied when the constructor finishes.
NativeHook(nint, Delegate, IDetourFactory, DetourConfig?, bool)
Constructs a NativeHook of
function, detouring it to hook using the provided config and detour factory.public NativeHook(nint function, Delegate hook, IDetourFactory factory, DetourConfig? config, bool applyByDefault)
Parameters
functionnint- A pointer to the native function to hook.
hookDelegate- The delegate which acts as the target of the hook.
factoryIDetourFactory- The IDetourFactory to use to interact with this hook.
configDetourConfig- The DetourConfig to use for this detour.
applyByDefaultbool- Whether or not this hook should be applied when the constructor finishes.