title: SetWindowsHookEx with WH_MOUSE_LL slows down the mouse for several seconds
body: <p>I am using the following code to get mouse messages on the current process.  </p>
  
  <pre><code>using (Process curProcess = Process.GetCurrentProcess())
  using (ProcessModule curModule = curProcess.MainModule)
  {
      return SetWindowsHookEx(WH_MOUSE_LL, proc, GetModuleHandle(curModule.ModuleName), 0);
  }
  </code></pre>
  
  <p>For some reason when this code runs the mouse get slow for several seconds and then back to normal.  </p>
  
  <p>Any ideas?<br>
  Thanks</p>
  
  <p><strong>EDIT - hook method</strong></p>
  
  <pre><code>private static IntPtr mouseEvent(int nCode, IntPtr wParam, IntPtr lParam)
  {
      if (nCode &gt;= 0 &amp;&amp; MouseMessages.WM_LBUTTONDOWN == (MouseMessages)wParam)
      {
          MSLLHOOKSTRUCT hookStruct = (MSLLHOOKSTRUCT)Marshal.PtrToStructure(lParam, typeof(MSLLHOOKSTRUCT));     
          LastLeftClick = new ClickInfo { Time = DateTime.Now, X = hookStruct.pt.x, Y = hookStruct.pt.y };
      }
      return CallNextHookEx(hookID, nCode, wParam, lParam);
  }
  
  public class ClickInfo
  {
      public int X { get; set; }
      public int Y { get; set; }
      public DateTime Time { get; set; }
  }
  </code></pre>