http://bugs.winehq.org/show_bug.cgi?id=18425
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2009-11-25 04:12:40 --- This behaviour is documented actually, attached testcase just proves it:
http://msdn.microsoft.com/en-us/library/ms682583%28VS.85%29.aspx
--- DLL_PROCESS_DETACH --- The DLL is being unloaded from the virtual address space of the calling process because *it was loaded unsuccessfully* or the reference count has reached zero (the processes has either terminated or called FreeLibrary one time for each time it called LoadLibrary). ---