> > > I think most of my problems were caused by trying to do stuff in the > > DLL_PROCESS_DETACH section of DllMain that shouldn't be done there. > > OleUninitialize, setting events, causing threads to run, suspend and > > finally exit...all too much as consequences of FreeLibrary call. > > >
The thread that gets the DLL_PROCESS_DETACH notification is not necessarily the one that got the DLL_PROCESS_ATTACH notification <http://blogs.msdn.com/oldnewthing/archive/2009/06/26/9804500.aspx>
