Mark Wyszomierski wrote:

app1:
SomeThread()
{
sqlite3 *db = opendatabase();
writesomestuff();
PostMessage(my_other_app, 0, 0);
closedatabase(db);
return 0;
}
app2:
MessageHandlerInMainThread()
{
sqlite3 *db = opendatabase();
ReadDatabaseStuff(db);
closedatabase();
return 0;
}
Thanks!
Mark

If SomeThread() is a worker thread in an application, before your app quits you must first send that worker thread some sort of shutdown message and explicitly wait for the thread handle to close via WaitForSingleObject() -- otherwise you may get leak reports as well.

Robert


Reply via email to