On 7-2-2018 13:54, Vlad Khorsun via Firebird-devel wrote:
07.02.2018 14:41, Mark Rotteveel wrote:
On 7-2-2018 12:36, Vlad Khorsun via Firebird-devel wrote:
07.02.2018 13:26, Mark Rotteveel wrote:
On 7-2-2018 11:55, Mark Rotteveel wrote:
Shouldn't the engine be able to cope with this?
Yes, and fb_shutdown handle it. But it can't handle it correctly
when process
exits and Windows already unloaded some dlls and kill all other threads.
That seems at odds with the documentation.
Documentation is not correct, unfortunately. It was written from
Linux perspective,
at times when such cases as current one was not known.
Ok. That means that the documentation may need to be revised there.
I was just experimenting with Jaybird, and I noticed an odd
inconsistency with fb_shutdown_callback on Windows. For other callbacks
in fbclient (ie the event callback), I must define the callback using
StdCall calling conventions. If I don't, things break. For the shutdown
callback, using the 'normal' JNA calling convention (which I assume is
cdecl) just works.
However with fb_shutdown_callback, if I do apply the StdCall convention,
then the callback is invoked, but the application ends with error
0xC0000409 ('unknown exception').
I haven't (yet) defined the method fb_shutdown_callback to explicitly
accept the StdCall callback (contrary to isc_queue_events), but I'm
surprised that it actually works without changing the calling
convention. Is this something specific to the shutdown callback?
Mark
--
Mark Rotteveel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel