Re: SetConsoleCtrlHandler called when accessing ODBC/OLEDB datasource



> I have a console mode application which behave badly when accessing a DBF
> file using a TAdoQuery. After hours of searching, I found that TAdoQuery
> call SetConsoleCtrlHandler API function when accessing a DBF file for the
> first time. Of course this call override my own handler and therefore the
> application doesn't work as expected. This doesn't happend when querying
an
> Oracle database.
>
> Any idea why SetConsoleCtrlHandler is called and how to avoid this ?

I've discovered that BANTAM.DLL (Borland Local Engine) call
SetConsoleCtrlHandler to install his own handler, ignoring any handler
already installed. The Borland handler call ExitProcess directly. So my own
handler is not called, not any of the finalization section ! Very bad
behaviour.

Any workaround available ?

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


.



Relevant Pages

  • SetConsoleCtrlHandler called when accessing ODBC/OLEDB datasource
    ... I have a console mode application which behave badly when accessing a DBF ... After hours of searching, I found that TAdoQuery ... Any idea why SetConsoleCtrlHandler is called and how to avoid this? ... Author of ICS (Internet Component Suite, freeware) ...
    (borland.public.delphi.database.ado)
  • Re: SetConsoleCtrlHandler called when accessing ODBC/OLEDB datasource
    ... DBF ... After hours of searching, I found that TAdoQuery ... Of course this call override my own handler and therefore ... >> Any idea why SetConsoleCtrlHandler is called and how to avoid this? ...
    (borland.public.delphi.database.ado)
  • Using SetConsoleCtrlHandler
    ... Is there a way to have the handler called ... `SetConsoleCtrlHandler' to observe the similar behavior. ... void handler { ... signal (SIGINT, handler); ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Aplication crash on Ctrl+C in console application
    ... You are better off asking this in Win32 ng as well. ... SetConsoleCtrlHandler to handle CTRL+C events. ... breakpoint inside this routine. ... It does not transfer control to my handler routine. ...
    (microsoft.public.vc.mfc)

Loading