Word Addin Local Keyboard Hook
问题 I'm trying to create a MS Word addin with an auto-correct feature. The code block below is taken from here. However it catches all the key events from any application. I know this is normal because in this line: SetWindowsHookEx(WH_KEYBOARD_LL, procedure, GetModuleHandle(module.ModuleName), 0); the last parameter is the thread id and when it is equal to 0 which means a global hook. But when I try to change it to: SetWindowsHookEx(WH_KEYBOARD_LL, procedure, GetModuleHandle(module.ModuleName),