Exemplo n.º 1
0
 public void SetActive()
 {
     keyHook = new HookProc(KeyHook);
     using (Process curProcess = Process.GetCurrentProcess())
         using (ProcessModule curModule = curProcess.MainModule)
         {
             hKeyHook = Win32Functions.SetWindowsHookEx(Win32Defines.WH_KEYBOARD_LL,
                                                        keyHook, (IntPtr)Win32Functions.GetModuleHandle(curModule.ModuleName), 0);
         }
 }