Ejemplo n.º 1
0
        static void InstallCreateWindowExHooks()
        {
            if (Managed)
            {
                return;
            }
            dCreateWindowExA = new CreateWindowExADelegate(CreateWindowEx);
            dCreateWindowExW = new CreateWindowExWDelegate(CreateWindowEx);

            hCreateWindowExA = AutoHookCreator("user32.dll", "CreateWindowExA", dCreateWindowExA);
            hCreateWindowExW = AutoHookCreator("user32.dll", "CreateWindowExW", dCreateWindowExW);

            hCreateWindowExA.Install();
            hCreateWindowExW.Install();
        }
Ejemplo n.º 2
0
        static void InstallIntroInjector()
        {
            if (ShowWindowHook != null || Managed)
            {
                return;
            }
#if !DEBUG
            CreateWindowExADel  = new CreateWindowExADelegate(hCreateWindowEx);
            CreateWindowExWDel  = new CreateWindowExWDelegate(hCreateWindowEx);
            CreateWindowExAHook = AutoHookCreator("user32.dll", "CreateWindowExA", CreateWindowExADel);
            CreateWindowExWHook = AutoHookCreator("user32.dll", "CreateWindowExW", CreateWindowExWDel);
            if (HookCreateWindowEx)
            {
                CreateWindowExADel = new CreateWindowExADelegate(hCreateWindowEx);
            }
#endif

            ShowWindowDel  = new ShowWindowDelegate(hShowWindow);
            ShowWindowHook = AutoHookCreator("user32.dll", "ShowWindow", ShowWindowDel);
            if (HookShowWindow)
            {
                ShowWindowHook.Install();
            }

            SetWindowPosDel  = new SetWindowPosDelegate(hSetWindowPos);
            SetWindowPosHook = AutoHookCreator("user32.dll", "SetWindowPos", SetWindowPosDel);
            if (HookSetWindowPos)
            {
                SetWindowPosHook.Install();
            }

            MoveWindowDel  = new MoveWindowDelegate(hMoveWindow);
            MoveWindowHook = AutoHookCreator("user32.dll", "MoveWindow", MoveWindowDel);
            if (HookMoveWindow)
            {
                MoveWindowHook.Install();
            }

            Log("Intro Injector Initialized...", true);
        }