[odb-users] Using ODB from DLL on Windows XP

Leo Ashkinaziy Leo_Ashkinaziy at symantec.com
Fri Jul 1 11:03:15 EDT 2016

Yeah, that doesn't happen. Thank you so much for your help!


On Fri, Jul 1, 2016 at 3:40 AM -0700, "Boris Kolpackov" <boris at codesynthesis.com<mailto:boris at codesynthesis.com>> wrote:

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.


More information about the odb-users mailing list