Subject dbHandleShared in a DLL
Author Matt Nielsen
I have a DLL that is loaded optionally at runtime. To prevent
duplicate database connections I pass the dbHandle to the dll as an
integer and then typecast it back to a pointer and assign it to the
Dll's Database.dbHandleShared property.

This seems to work fine until I close the application that loaded the
DLL. I read in the FAQ that I should close the connection in the
main app before I unload the DLL to prevent problems. I'm doing this
but I'm still getting an error:

'This is a potential problem: 335544485' error when I close the
application which in turn unloads the dll.

Am I doing something else wrong or is this a bug. I have veriosn