Hello.

I'm developing .dll plugin for thirdparty software. In Windows 8.0 all works fine (my plugin loads and unloads correctly),
but in wine, I got 
DLL_PROCESS_ATTACH, then 7 DLL_THREAD_ATTACH at plugin loading stage and
only 1 DLL_THREAD_DETACH at plugin unloading,
i.e my plugin remains active (because no DLL_PROCESS_DETACH came in).

Maybe that's because I spawn new thread (CreateThread) at DLL_PROCESS_ATTACH.

Please, suggest ways to debug this issue.

Regards,
Vyacheslav Napadovsky