Exemple #1
0
        public void SetWinHook()
        {
            KeyboardHookProcedure = new user32.HookProc(KeyboardHookProc);

            IsCallNextHook = true;

            HookID = user32.SetWindowsHookEx(user32.WH_KEYBOARD_ALL,
                                             KeyboardHookProcedure,
                                             Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().ManifestModule),
                                             0);
        }
Exemple #2
0
        public void SetWinHook()
        {
            KeyboardHookProcedure = new user32.HookProc(KeyboardHookProc);

            IsCallNextHook = true;

            HookID = user32.SetWindowsHookEx(user32.WH_KEYBOARD_ALL,
                KeyboardHookProcedure,
                Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().ManifestModule),
                0);
        }