[odb-users] Using ODB from DLL on Windows XP
Boris Kolpackov
boris at codesynthesis.com
Fri Jul 1 06:40:05 EDT 2016
Hi Leo,
Leo Ashkinaziy <Leo_Ashkinaziy at symantec.com> writes:
> I pretty much pasted libodb/odb/details/win32/dll.cxx into our DllMain()
> and that worked for the DLL. For the ConsoleApp I call process_start() and
> thread_start() in the start of main() and thread_end() and process_end() at
> the end. I'm assuming that's the correct thing to do?
Yes, provided ConsoleApp doesn't load DynLib.dll. The situation you want to
avoid is whan an executable that loads DynLib.dll also links to the (static)
ODB libraries. Then you will end up with multiple copies of process-wide data
structures and nothing good will come out of that.
Boris
More information about the odb-users
mailing list