www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/16/00:56:20

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help with Control-break code
Date: Wed, 12 Feb 1997 21:13:12 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 28
Message-ID: <3302A2E8.152@cs.com>
References: <5dt2r6$hg8 AT ruby DOT ucc DOT nau DOT edu>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp103.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019