Exemplo n.º 1
0
        /// <summary>
        /// 卸载钩子
        /// </summary>
        private void StopHook()
        {
            Hooker.Stop();

            //bool stop = true;
            //if (hMouseHook != 0)
            //{
            //    stop = UnhookWindowsHookEx(hMouseHook);
            //    hMouseHook = 0;

            //    if (!stop)
            //    {//卸载钩子失败

            //        MessageBox.Show("Unhook failed!");
            //    }
            //}
        }