CTRL+ALT+DEL key combination

  • Thread starter Thread starter Anatoly
  • Start date Start date
A

Anatoly

Is it possible to catch CTRL+ALT+DEL combination and/or prevent user to
close application from Task Manager?
Thanks.
 
The OS catches CTRL+ALT+DEL combination, and it will never report it to any
applications. This is intentional for security reason, so that no
application can fake a login screen.

So the answer is NO.

CT said:
If we could just answer all questions in this short fashion...<g>
 
I havn't tested it for Ctrl+Alt+Del, but:
Windows provides a hooking mechanism for computer based training. Basically,
you register a callback wtih windows that recieves messages when certain
events occur. In this case, you need to register a CBT Hook and monitor for
the HCBT_SYSCOMMAND message. HCBT_SYSCOMMAND is defined as:
"A system command is about to be carried out. This allows a CBT application
to prevent task switching by means of hot keys." (Platform SDK)

Look up SetWindowsHookEx and CBTProc in the platform SDK. You will have to
do some interop, probably have to write an unmanaged Dll that contains the
hook function, but i think the capacity is there.
 
Back
Top