public static HookWrapper <T> Hook <T>(string signature, T detour, int addressOffset = 0) where T : Delegate { var addr = Scanner.ScanText(signature); var h = new Hook <T>(addr + addressOffset, detour); var wh = new HookWrapper <T>(h); HookList.Add(wh); return(wh); }
public static HookWrapper <T> Hook <T>(IntPtr addr, T detour, bool enable = true) where T : Delegate { var h = new Hook <T>(addr, detour); var wh = new HookWrapper <T>(h); if (enable) { wh.Enable(); } HookList.Add(wh); return(wh); }
public static HookWrapper <T> Hook <T>(string signature, T detour, bool enable = true) where T : Delegate { var addr = Common.Scanner.ScanText(signature); var h = new Hook <T>(addr, detour); var wh = new HookWrapper <T>(h); if (enable) { wh.Enable(); } HookList.Add(wh); return(wh); }