TIP: Click on subject to list as thread! ANSI
echo: z3_pascal
to: Eric Tam
from: Kieran Morrissey
date: 1996-06-29 22:33:00
subject: Disable Ctrl-Break

* In a message originally to All, Eric Tam said:
 >> This message was written at 11:25a on 06-25-1996.

 >> Hi All, How can I fully disable the Ctrl-Break in Pascal?
Write a dummy procedure to hook INT #1Bh (33 in Decimal)...

eg:

-- CBOFF.PAS --

var
       CBHandler: Pointer;

{$F+}
procedure CtrlBreak; interrupt;
begin
       {here you set whatever you want to do when Ctrl Break is pressed}
end;
{$F-}


begin
       GetIntVec($1B,CBHandler);
       SetIntVec($1B,Addr(CtrlBreak));
       {Program code goes here.. CBHandler MUST BE PRESERVED!!!!}
       {At end of code:}
       SetIntVec($1B,CBHandler);               {Resets Ctrl-Break handler}
end.

-- EOF --

                                               Kieran Morrissey

--- FMail/386 1.02
* Origin: Industrial Disease, Glenhuntly Vic, +613 9576 9487 (3:634/376)
SEEN-BY: 633/267 270
@PATH: 634/376 396 635/503 50/99 635/544 727 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.