public ZoomWebBrowser() : base() { _hookID_LLMouse = IntPtr.Zero; callBackDelegate = new HOOKProc(LLMouseCallback); nIdxZoom = 5; }
private IntPtr SetHook(HOOKProc proc, int hookID) { using (System.Diagnostics.Process curProcess = System.Diagnostics.Process.GetCurrentProcess()) using (System.Diagnostics.ProcessModule curModule = curProcess.MainModule) { //return SetWindowsHookEx(hookID, proc, // GetModuleHandle(curModule.ModuleName), 0); //uint ui = (uint)System.Threading.Thread.CurrentThread.ManagedThreadId; //ui = (uint)AppDomain.GetCurrentThreadId(); return(SetWindowsHookEx(hookID, proc, GetModuleHandle(curModule.ModuleName), 0)); } }
private static extern IntPtr SetWindowsHookEx(int idHook, HOOKProc lpfn, IntPtr hMod, uint dwThreadId);