Exemple #1
0
        /// <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);
            }
        }
		public void SetUp()
		{
			_handler = new DummyHandler();
			_hotKeysLL = new NuGenHotKeysLL();
		}
		/// <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);
			}
		}