public static extern int GetCurrentThreadId(); }
// Install the hook public void Install() { int threadId = Kernel32.GetCurrentThreadId(); m_hhook = SetWindowsHookEx(m_hookType, m_filterFunc, IntPtr.Zero, threadId); }