windows - Why is SetWindowsHookEx() returning NULL and LastError is ERROR_HOOK_NOT_INSTALLED -


i have code has been working without reported issues few years. sets low level keyboard hook user uses activate application.

m_hkeyboardhook = setwindowshookex(wh_keyboard_ll, keybhookfn, getmodulehandle(null), 0); 

for 1 user of sudden (it worked him before years well), keyboard hook isn't working. upon investigation, can see setwindowshookex() returning null , getlasterror() returning 0x00000597, error_hook_not_installed.

i can't find documentation on means.

what possibilities why might happen? system security settings? user account privileges? user using windows 7.

i need specific answer how make error occur can solve user's problem

looking @ http://blogs.msdn.com/b/alejacma/archive/2010/10/14/global-hooks-getting-lost-on-windows-7.aspx, seems might occur if cpu load high.

another thought: did break when upgrading 64-bit windows? don't know if applies ll hooks, cannot inject 32-bit dll in 64-bit process.

finally: ll hooks won't capture input in uac-elevated process if hook not installed uac-elevated process (a lower privilege level process cannot capture input of higher privilege level one)


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -