From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e812d69362dc764c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-16 06:16:21 PST Path: supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.onemain.com!feed1.onemain.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail From: Marin David Condic Newsgroups: comp.lang.ada Subject: Re: How to lock keys. Date: Sat, 16 Dec 2000 09:15:17 -0500 Organization: Quadrus Corporation Message-ID: <3A3B78F4.433594D8@acm.org> References: NNTP-Posting-Host: d1.56.bb.9d Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 16 Dec 2000 14:15:05 GMT X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:3202 Date: 2000-12-16T14:15:05+00:00 List-Id: Great minds think alike! :-) Just saw this after posting my earlier response concerning SetConsoleCtrlHandler. Additional information: Look for a package in the Win32ada binding (don't know where it is in Object Ada, but I believe it exists somewhere there!) named: package Win32.Wincon is The call you want to investigate is: function SetConsoleCtrlHandler( HandlerRoutine: PHANDLER_ROUTINE; Add : Win32.BOOL) return Win32.BOOL; How to hook up to this and provide a handler routine would seem to be a fair Ada related question. MDC DuckE wrote: > Under Windows NT (the doc's indicate this should work under 98) there is a > function called "SetConsoleCtrlHandler" that permits you to add a handler > callback that is invoked when Ctrl+C is typed. The action that is taken > depends on the return from this function. -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Giving money and power to Government is like giving whiskey and car keys to teenage boys." -- P. J. O'Rourke ======================================================================