Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Jul : SetConsoleCtrlHandler doesn't work as expected

www.cryer.info
Managed Newsgroup Archive

SetConsoleCtrlHandler doesn't work as expected

Subject:SetConsoleCtrlHandler doesn't work as expected
Posted by:"Francois Piette [ICS & Midware]" (francois.piet..@overbyte.be)
Date:Fri, 15 Jul 2005 11:31:02

I have a console mode application.

I use SetConsoleCtrlHandler to install a trap to know when the user is
shutting down the application, either using CTRL-C or clicking on the close
button on the upper right corner of the application window.

This works OK in most situations, but not always. Sometimes, my application
is shutdown without calling the handler I've setup.

Any advice appreciated.

--
francois.piette@overbyte.be
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be

Replies:

www.cryer.info
Managed Newsgroup Archive