Example #1
0
 public void UnHook()
 {
     WindowsAPI.UnhookWindowsHookEx(hHook);
 }
Example #2
0
 public void SetHook()
 {
     KeyboardHookFunction = new WindowsAPI.HookProc(KeyboardHookProcess);
     hHook = WindowsAPI.SetWindowsHookEx(WindowsAPI.WH_KEYBOARD_LL, KeyboardHookFunction,
                                         WindowsAPI.GetModuleHandle(Process.GetCurrentProcess().MainModule.ModuleName), 0);
 }