mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
Add hooking overloads (#1820)
This commit is contained in:
parent
10b44ba6d0
commit
b5d52732e0
2 changed files with 36 additions and 4 deletions
|
|
@ -48,7 +48,7 @@ public interface IGameInteropProvider
|
|||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
||||
/// <returns>The hook with the supplied parameters.</returns>
|
||||
/// <typeparam name="T">Delegate of detour.</typeparam>
|
||||
public Hook<T> HookFromFunctionPointerVariable<T>(IntPtr address, T detour) where T : Delegate;
|
||||
public Hook<T> HookFromFunctionPointerVariable<T>(nint address, T detour) where T : Delegate;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a hook by rewriting import table address.
|
||||
|
|
@ -85,7 +85,31 @@ public interface IGameInteropProvider
|
|||
/// <param name="backend">Hooking library to use.</param>
|
||||
/// <returns>The hook with the supplied parameters.</returns>
|
||||
/// <typeparam name="T">Delegate of detour.</typeparam>
|
||||
Hook<T> HookFromAddress<T>(IntPtr procAddress, T detour, HookBackend backend = HookBackend.Automatic) where T : Delegate;
|
||||
Hook<T> HookFromAddress<T>(nint procAddress, T detour, HookBackend backend = HookBackend.Automatic) where T : Delegate;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a hook. Hooking address is inferred by calling to GetProcAddress() function.
|
||||
/// The hook is not activated until Enable() method is called.
|
||||
/// Please do not use MinHook unless you have thoroughly troubleshot why Reloaded does not work.
|
||||
/// </summary>
|
||||
/// <param name="procAddress">A memory address to install a hook.</param>
|
||||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
||||
/// <param name="backend">Hooking library to use.</param>
|
||||
/// <returns>The hook with the supplied parameters.</returns>
|
||||
/// <typeparam name="T">Delegate of detour.</typeparam>
|
||||
Hook<T> HookFromAddress<T>(nuint procAddress, T detour, HookBackend backend = HookBackend.Automatic) where T : Delegate;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a hook. Hooking address is inferred by calling to GetProcAddress() function.
|
||||
/// The hook is not activated until Enable() method is called.
|
||||
/// Please do not use MinHook unless you have thoroughly troubleshot why Reloaded does not work.
|
||||
/// </summary>
|
||||
/// <param name="procAddress">A memory address to install a hook.</param>
|
||||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
||||
/// <param name="backend">Hooking library to use.</param>
|
||||
/// <returns>The hook with the supplied parameters.</returns>
|
||||
/// <typeparam name="T">Delegate of detour.</typeparam>
|
||||
unsafe Hook<T> HookFromAddress<T>(void* procAddress, T detour, HookBackend backend = HookBackend.Automatic) where T : Delegate;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a hook from a signature into the Dalamud target module.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue