Intercepting Windows shutdown messages in Btrieve apps -
01-25-2005
, 11:11 AM
Hello -
I have an application i wrote that accesses and displays Btrieve data, and
sits in the user's tray area in Windows. I'm trying to add in code to
support the situation where teh user chooses to shutdown or restart windows,
and i then need to properly clean up and close the application.
Depending on what the user is doing - or not doing - with the program, more
often than not i get a dialog popping up saying that there are active
connections to teh Microkernal database. I want to totally avoid a dialog
like this, and do this properly even if the user has files open.
I'm trapping the WM_QUERYENDSESSION message and issuiing a B_STOP call to
Btrieve which should immediately close all open files, but i'm still getting
this Pervasive dialog popping up.
This occurs on both Windows XP and Windows 2000 using the Workgroup
pervasive engine, version 8.6.
Is there a better way to handle this?
Thanks,
Alan Olson |