Class Hook
- Namespace
- SharpPluginLoader.Core.Memory
- Assembly
- SharpPluginLoader.Core.dll
public static class Hook
- Inheritance
-
Hook
- Inherited Members
Methods
Create<TFunction>(long, TFunction)
Creates a new native function hook.
public static Hook<TFunction> Create<TFunction>(long address, TFunction hook)
Parameters
addresslongThe address of the function to hook
hookTFunctionThe hook function
Returns
- Hook<TFunction>
The hook object
Type Parameters
TFunctionThe type of the function to hook
Create<TFunction>(string, int, TFunction)
Creates a new native function hook.
public static Hook<TFunction>? Create<TFunction>(string pattern, int offset, TFunction hook)
Parameters
patternstringA pattern to scan for to find the address of the function to hook
offsetintAn offset from the scanned for address to the start of the function
hookTFunctionThe hook function
Returns
- Hook<TFunction>
The hook object, if the scan returned a result
Type Parameters
TFunctionThe type of the function to hook