Subj : Re: stupid threading question .... To : comp.programming.threads From : David Schwartz Date : Mon Aug 15 2005 06:36 pm "David Hopwood" wrote in message news:ft8Me.5250$0u2.4106@fe2.news.blueyonder.co.uk... > John Hickin wrote: >> It has been a while since I did anything on Windows but I remember that >> there were critical sections under the hood during DLL init. > Indeed there has to be mutual exclusion on dynamic library initialization, > in any OS or language that supports both threads, and lazy init of dynamic > libraries on first use. Allowing libraries to be initialized concurrently > by more than one thread couldn't possibly work. I was under the impression that either Windows totally took care of this under the hood by serializing DLL intiatlization or that Windows would take care of this under the hood *if* you put your DLL's threading police in the registry (apartment, free, etcetera). I thought the only way you could get into trouble was if you told Windows you could handle something you actually couldn't. But I could be remembering wrong. DS .