I am trying to convert a mouse hook like this.........
MouseHookProcedure = new HookProc(Form1.MouseHookProc);
hHook = SetWindowsHookEx(WH_MOUSE,
MouseHookProcedure,
(IntPtr)0,
AppDomain.GetCurrentThreadId());
To a low level mouse hook like this........
MouseHookProcedure =
new HookProc(Form1.LowLevelMouseProc);
hHook = SetWindowsHookEx(WH_MOUSE_LL,
MouseHookProcedure,
AppDomain.GetCurrentThreadId(),0);
I get the following errors
Warning 1 'System.AppDomain.GetCurrentThreadId()' is obsolete: 'AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. http://go.microsoft.com/fwlink/ linkid=14202'
Please help.
Thanks in advance!