home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!ariel!ucsvc.ucs.unimelb.edu.au!lugb!lux!9125113g
- From: 9125113g@lux.latrobe.edu.au (Mitch Davis)
- Newsgroups: comp.lang.pascal
- Subject: Re: Ctrl-Break in TP 6.0 programs
- Message-ID: <1992Sep11.103038.11122@lugb.latrobe.edu.au>
- Date: 11 Sep 92 10:30:38 GMT
- References: <5341@tuegate.tue.nl> <exuptr.475.716143552@exu.ericsson.se>
- Sender: news@lugb.latrobe.edu.au (USENET News System)
- Organization: La Trobe University
- Lines: 27
-
- In article <exuptr.475.716143552@exu.ericsson.se> exuptr@exu.ericsson.se (exuptr@exu.ericsson.se) writes:
- >In article <5341@tuegate.tue.nl> erik@blade (Erik Manders) writes:
- >
- >>Hello,
- >
- >>When I write a program in Turbo Pascal 6.0, it is always possible to
- >>interrupt it by pressing Ctrl-Break. I don't want this to be possible,
- >>so is there anybody who knows what I have to do to prevent this.
- >
- >*Sigh*
- >uses crt;
- >....
- >begin
- >...
- >Checkbreak := false;
-
- Sigh. CheckBreak controls whether DOS checks for Ctrl-Break ALL the
- time, or just when doing console input/output. It is still possible for
- programs that have CheckBreak := false to be halted using Ctrl-Break.
-
- Two solutions that DO work: Make an int $09 handler, which swallows the
- Pause(etc) key if the Ctrl key is pressed, or make an Int $23 (is that
- right?) handler which grabs the Ctrl-Break but doesn't ask for a halt.
-
- Neither are particularly easy, but at least they work.
-
- Mitch.
-