Mail Archives: djgpp/1997/02/16/00:56:20
Michael Dylan Ryan wrote:
>
> Can someone give me some code (or point me in the right direction) on
> disabling control-break, control-c, control-alt-del?
Disabling Ctrl-C and Ctrl-Break is as simple as the following code:
#include <signal.h>
signal( SIGINT, SIG_IGN );
Disabling Ctrl-Alt-Del is more difficult because that keystroke is
handled directly by the BIOS; meaning your program never sees it. The
only way to stop the three-finger salute from rebooting your computer is
to install a keyboard interrupt handler routine. Instructions on how to
handle interrupts can be found in the DJGPP FAQ (v2/faq210b.zip from
SimTel). Examples of such routines can be found in several packages in
the 'v2tk' directory at SimTel, such as 'mkkbd3.zip', 'libkb100.zip',
and 'alleg21.zip'.
Hope this helps!
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| Plan: To find ANYONE willing to | http://www.cs.com/fighteer |
| play Descent 2 on DWANGO! | Tagline: <this space for rent> |
---------------------------------------------------------------------
- Raw text -