Re: DLL and synchronizing global data
The statically defined objects have simple constructors that don't
allocate any resources, so they don't do anything interesting when they
are constructed at DLL initialization.
OK.
All resources are loaded in "static object->load()" method which is called
the first time a thread detects that the object hasn't been loaded
previously. All subsequent threads skip this.
Are you using DllMain's DLL_THREAD_ATTACH case for this?
If so, then the same rules apply.
CoInitialize() and the loading of the MSXML6.DLL only happen in
object->load(), so their execution is delayed until the first thread
executes.
Be aware that if you should be using the DLL_THREAD_ATTACH case for this, it
will not be executed for thread that already existed when your dll gets
loaded.
For example, if an app creates worker threads, and then loads your dll via
loadlibrary, the DLL_THREAD_ATTACH case will not be executed for those
threads.
--
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"