コード例 #1
0
 /// <summary>
 /// Uninstalls the global hook
 /// </summary>
 public void Unhook()
 {
     PInvoke.UnhookWindowsHookEx(hhook);
 }
コード例 #2
0
        /// <summary>
        /// Installs the global hook
        /// </summary>
        public void Hook()
        {
            IntPtr hInstance = PInvoke.LoadLibrary("User32");

            hhook = PInvoke.SetWindowsHookEx(WH_KEYBOARD_LL, HookProc, hInstance, 0);
        }