winmm: Do not unload drivers when the process is terminating.

This commit is contained in:
Lei Zhang 2008-04-28 12:28:19 -07:00 committed by Alexandre Julliard
parent d2a8461585
commit d20f982433
1 changed files with 8 additions and 2 deletions

View File

@ -193,8 +193,14 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
/* close all opened MCI drivers */
MCI_SendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_WAIT, 0L, TRUE);
MMDRV_Exit();
/* now unload all remaining drivers... */
DRIVER_UnloadAll();
/* There's no guarantee the drivers haven't already been unloaded on
* process shutdown.
*/
if (!fImpLoad)
{
/* now unload all remaining drivers... */
DRIVER_UnloadAll();
}
WINMM_DeleteIData();
break;