Example #1
0
        public static void setup_hook()
        {
            IntPtr instance = DLLImports.LoadLibrary("user32.dll");

            if (instance == IntPtr.Zero)
            {
                return;
            }

            KeyboardHookGCRootedDelegate = keyboard_hook_process;
            keyboard_hook = DLLImports.SetWindowsHookEx(HookType.WH_KEYBOARD_LL, KeyboardHookGCRootedDelegate, instance, 0);
        }
Example #2
0
        public static void setup_hook()
        {
            IntPtr instance = DLLImports.LoadLibrary("user32.dll");

            if (instance == IntPtr.Zero)
            {
                return;
            }

            MouseHookGCRootedDelegate = mouse_hook_process;
            mouse_hook = DLLImports.SetWindowsHookEx(HookType.WH_MOUSE_LL, MouseHookGCRootedDelegate, instance, 0);
        }