I'm writing a password manager for Windows which I want to protect against keyloggers. There is a timeout of 5000 ms for keyboard hooks.
The hook procedure should process a message in less time than the data entry specified in the LowLevelHooksTimeout value in the following registry key:
HKEY_CURRENT_USER\Control Panel\Desktop
The value is in milliseconds.
(The default value of that Registry key is 5000)
Assuming a password manager running as administrator, could I suspend all programs, simulate typing a key, wait for 5 seconds and then be sure that all keyboard hooks have been disabled by Windows?
I've not found a way of unregistering all hooks via UnhookWindowsHookEx because it requires a handle that I do not have. This is why I'm resorting to unregistering them by timeout.