public void InstallKeyboardHook()
		{
			m_keyboardHookProcedure = new HOOKPROC(KeyboardHookProc);
			m_keyboardHook = new NuGenHookHandle(WinUser.WH_KEYBOARD_LL, m_keyboardHookProcedure);

			if (m_keyboardHook.IsInvalid)
			{
				throw new Win32Exception(Marshal.GetLastWin32Error(), Resources.Win32_InvalidKbdLLHookHandle);
			}
		}
Exemple #2
0
		public static extern IntPtr CallNextHookEx(NuGenHookHandle hhk, Int32 nCode, IntPtr wParam, IntPtr lParam);
Exemple #3
0
 public static extern IntPtr CallNextHookEx(NuGenHookHandle hhk, Int32 nCode, IntPtr wParam, IntPtr lParam);
		/// <summary>
		/// Initializes a new instance of the <see cref="NuGenKeyInterceptor"/> class.
		/// </summary>
		public NuGenKeyInterceptor()
		{
			_hotKeys = new NuGenHotKeysLL();
			_hookCallBack = new HOOKPROC(this.HookCallback);
			_handle = new NuGenHookHandle(WinUser.WH_KEYBOARD_LL, _hookCallBack);

			if (_handle.IsInvalid)
			{
				throw new Win32Exception(Marshal.GetLastWin32Error(), Resources.Win32_InvalidKbdLLHookHandle);
			}
		}