On Tue, Nov 29, 2016 at 5:13 PM, Tomas Hajny <xhaj...@hajny.biz> wrote:
> > 1) Instead of using the special handler registered via > SetConsoleCtrlHandler (invoked in a special thread), isn't it possible to > process this event in the exception handler (running in the same thread > probably)? > Not that I'm (or MSDN) aware of. Instead there is a flag ENABLE_PROCESSED_INPUT that's on by default for a console. It would suppress the handler for Ctrl+C and would pass it as a regular key combination (bringing the desired #3 keychar). (as I noted in my comment in the bug tracker, clearing ENABLE_PROCESSED_INPUT flag was used originally. See TurnMouseOff procedure. However it was removed at some point, causing the regression?) Windows is raising an exception only if a process is being debugged, so a debugger would be aware of it. That's the only time, whenever the exception is used. MSDN however doesn't specify at what thread the exception is risen. So the newest patch removes all threading-related concerns. thanks, Dmitry
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal