Hi,
Is it possible to block the user input, like keyboard and mouse?
(sorry for the double post)
Thank you in advance
Block user input (keyboard & mouse)
Re: Block user input (keyboard & mouse)
You're probably looking for an API such as BlockInput()
--Iconic
https://msdn.microsoft.com/en-us/librar ... 85%29.aspxBlocks keyboard and mouse input events from reaching applications.
--Iconic
Re: Block user input (keyboard & mouse)
I meant for a global hook, not just for my application.
My purpose is to block the CTRL+ALT+DELETE (for example) in some situations.
My purpose is to block the CTRL+ALT+DELETE (for example) in some situations.
Re: Block user input (keyboard & mouse)
I doubt that a user mode API hook can block Ctrl+Alt+Delete. I wouldn't know which API to hook for that to work. I'm not sure that there is a simple API for that, either, but I don't know for sure. You may have to write a driver to block Ctrl+Alt+Delete, but I don't really know.
I hope this is for a legit purpose? Blocking Ctrl+Alt+Delete sounds rather agressive/suspicious.
I hope this is for a legit purpose? Blocking Ctrl+Alt+Delete sounds rather agressive/suspicious.
Re: Block user input (keyboard & mouse)
CTRL+ALT+DEL is a security combination and it's not easily intercepted. If just anyone could intercept it there would be a massive security hole in the OS. You've a few choices...
[1] Subclass Winlogon's SAS window and intercept the key press combination there (on newer OSs such as Windows 8.1 Winlogon is now a protected process)
[2] Hook the existing GINA or replace it with your own GINA DLL that can capture it
[3] Write a keyboard filter driver
P.S: SetWindowsHookEx(WH_KEYBOARD_LL) will not work either
--Iconic
[1] Subclass Winlogon's SAS window and intercept the key press combination there (on newer OSs such as Windows 8.1 Winlogon is now a protected process)
[2] Hook the existing GINA or replace it with your own GINA DLL that can capture it
[3] Write a keyboard filter driver
P.S: SetWindowsHookEx(WH_KEYBOARD_LL) will not work either
--Iconic