mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 12:23:39 +01:00
cleanup: remove obsolete Hook ctors
This commit is contained in:
parent
ddf4e56ee6
commit
276ad3733f
1 changed files with 0 additions and 39 deletions
|
|
@ -26,32 +26,6 @@ public class Hook<T> : IDisposable, IDalamudHook where T : Delegate
|
||||||
|
|
||||||
private readonly Hook<T>? compatHookImpl;
|
private readonly Hook<T>? compatHookImpl;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="Hook{T}"/> class.
|
|
||||||
/// Hook is not activated until Enable() method is called.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="address">A memory address to install a hook.</param>
|
|
||||||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
|
||||||
[Obsolete("Use Hook<T>.FromAddress instead.")]
|
|
||||||
public Hook(IntPtr address, T detour)
|
|
||||||
: this(address, detour, false, Assembly.GetCallingAssembly())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="Hook{T}"/> class.
|
|
||||||
/// 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="address">A memory address to install a hook.</param>
|
|
||||||
/// <param name="detour">Callback function. Delegate must have a same original function prototype.</param>
|
|
||||||
/// <param name="useMinHook">Use the MinHook hooking library instead of Reloaded.</param>
|
|
||||||
[Obsolete("Use Hook<T>.FromAddress instead.")]
|
|
||||||
public Hook(IntPtr address, T detour, bool useMinHook)
|
|
||||||
: this(address, detour, useMinHook, Assembly.GetCallingAssembly())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Hook{T}"/> class.
|
/// Initializes a new instance of the <see cref="Hook{T}"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -61,19 +35,6 @@ public class Hook<T> : IDisposable, IDalamudHook where T : Delegate
|
||||||
this.address = address;
|
this.address = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("Use Hook<T>.FromAddress instead.")]
|
|
||||||
private Hook(IntPtr address, T detour, bool useMinHook, Assembly callingAssembly)
|
|
||||||
{
|
|
||||||
if (EnvironmentConfiguration.DalamudForceMinHook)
|
|
||||||
useMinHook = true;
|
|
||||||
|
|
||||||
this.address = address = HookManager.FollowJmp(address);
|
|
||||||
if (useMinHook)
|
|
||||||
this.compatHookImpl = new MinHookHook<T>(address, detour, callingAssembly);
|
|
||||||
else
|
|
||||||
this.compatHookImpl = new ReloadedHook<T>(address, detour, callingAssembly);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a memory address of the target function.
|
/// Gets a memory address of the target function.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue