public void Install()
{
#pragma warning disable 618
hHook = SetWindowsHookEx(hookType, filterFunc, IntPtr.Zero, (int)AppDomain.GetCurrentThreadId());
// doesn't work:
//hHook = SetWindowsHookEx(hookType, filterFunc, IntPtr.Zero, (int)Thread.CurrentThread.ManagedThreadId);
#pragma warning restore 618
}