First of all, I know global variables are evil :) However, there is legit case why I need to use one.
I know that there are very strict limitation on what can be executed in DllMain (no LoadLibraries, no COM initialization and so on).
And I know that global variables are initialized just prior DllMain DLL_PROCESS_ATTACH.
Do I have the same limitation while global variable initialization?
I found Microsoft article: http://msdn.microsoft.com/en-us/library/988ye33t However, it doesn't have any details related to the limitations.
I saw also another Stackoverflow questions: What happens to global variables declared in a DLL? Here is snippet from there "There are things that are forbidden to do in the DllMain. Those things are probably forbidden, too, in the constructors."
However, it looks like commentor isn't sure whether such limitations are really exist.
I would appreciate any information on this subject.