Exemplo n.º 1
0
 internal static void SetMouseMoveHook()
 {
     try
     {
         if (!(GlobalKeyBoardMouseHooks.mMouseHookId == IntPtr.Zero))
         {
             return;
         }
         GlobalKeyBoardMouseHooks.mMouseHookId = GlobalKeyBoardMouseHooks.SetHook(GlobalKeyBoardMouseHooks.mMouseProc);
     }
     catch (Exception ex)
     {
         Logger.Warning("Exception setting global mouse hook" + ex.ToString());
     }
 }
Exemplo n.º 2
0
 internal static void SetBossKeyHook()
 {
     try
     {
         GlobalKeyBoardMouseHooks.SetKey(RegistryManager.Instance.BossKey);
         if (!(GlobalKeyBoardMouseHooks.mKeyboardHookID == IntPtr.Zero))
         {
             return;
         }
         GlobalKeyBoardMouseHooks.mKeyboardHookID = GlobalKeyBoardMouseHooks.SetHook(GlobalKeyBoardMouseHooks.mKeyboardProc);
     }
     catch (Exception ex)
     {
         Logger.Warning("Exception setting global hook" + ex.ToString());
     }
 }