public static void StartHook() { _mouse_hookID = KMHook.SetHook(_mouse_proc, WinAPI.WH_MOUSE_LL); _hookID = KMHook.SetHook(_proc, WinAPI.WH_KEYBOARD_LL); Thread.Sleep(10); //Give some time for it to apply Logging.Log("Global hooks started."); }
public static void StartHook() { if (!CheckHook()) { return; } _mouse_hookID = KMHook.SetHook(_mouse_proc, (int)KMHook.KMMessages.WH_MOUSE_LL); _hookID = KMHook.SetHook(_proc, (int)KMHook.KMMessages.WH_KEYBOARD_LL); Thread.Sleep(10); //Give some time for it to apply }