http://bugs.winehq.org/show_bug.cgi?id=8934
Summary: FreeLibraryAndExitThread looks wrong Product: Wine Version: unspecified Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-kernel AssignedTo: wine-bugs@winehq.org ReportedBy: pablo.yabo@gmail.com
I saw the documentation of FreeLibraryAndExitThread in the MSDN and says: "The FreeLibraryAndExitThread function allows threads that are executing within a DLL to safely free the DLL in which they are executing and terminate themselves. If they were to call FreeLibrary and ExitThread separately, a race condition would exist. The library could be unloaded before ExitThread is called."
And the implementation of Wine does exactly: FreeLibrary(hMod); ExitThread(dwExitCode);
There is no difference to call both functions instead of this.