private void Start() { IntPtr handle = GetModuleHandle(Process.GetCurrentProcess().MainModule.ModuleName); Proc = new HookProc(CallBackHook); IntPtr HookHandle = SetWindowsHookEx(HookType.WM_KEYBOARD_LL, Proc, handle, 0); if (HookHandle == null || HookHandle == IntPtr.Zero) { Console.Write("Error while installing hook"); } }
HookHandle = SetWindowsHookEx(HookType.WM_KEYBOARD_LL, Proc, handle, Thread.CurrentThread.ManagedThreadId);
AppDomain.GetCurrentThreadId()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)