daily pastebin goal
78%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
  2. internal static extern IntPtr SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hMod, uint dwThreadId);
  3.  
  4. private void AddMouseHook()
  5. {
  6.     MouseHookProcedure = new User32.HookProc(MouseHookProc);
  7.     hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, MouseHookProcedure, (IntPtr)null, 0);
  8. }
  9.    
  10. ThreadStart ts = new ThreadStart(AddMouseHook);
  11. Thread th = new Thread(ts);
  12. th.Start();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top