aymericb wrote:
> 
> The violation is that no C function should be called from DllMain(). 
> 


Sorry. Small/Big mistake here. Forgot one important word. I meant "The 
violation is that no C library function should be called from DllMain()."

The deadlock problem is clearly similar to the one explained by Raymond Chen:
http://blogs.msdn.com/oldnewthing/archive/2004/01/28/63880.aspx

Since CRT functions are likely to lock things internally, you may end up in the 
same situation than his "g_csGlobal" example, but with a CRT lock instead. 

I think the fix should be to do what MSDN documentation suggest, instead of 
relying on obscure undocumented implementation details:

> 
> Warning  There are serious limits on what you can do in a DLL entry point. To 
> provide more complex initialization, create an initialization routine for the 
> DLL. You can require applications to call the initialization routine before 
> calling any other routines in the DLL.
> 


Kind Regards,
Aymeric Barthe

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15636#15636





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to