예제 #1
0
    public static HookWrapper <T> Hook <T>(void *address, T detour) where T : Delegate
    {
        var h  = new Hook <T>(new IntPtr(address), detour);
        var wh = new HookWrapper <T>(h);

        HookList.Add(wh);
        return(wh);
    }
예제 #2
0
    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);
    }
예제 #3
0
파일: Common.cs 프로젝트: 0ceal0t/PartyPlus
        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);
        }
예제 #4
0
        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);
        }