Commit d20f9824 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

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

parent d2a84615
...@@ -193,8 +193,14 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) ...@@ -193,8 +193,14 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
/* close all opened MCI drivers */ /* close all opened MCI drivers */
MCI_SendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_WAIT, 0L, TRUE); MCI_SendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_WAIT, 0L, TRUE);
MMDRV_Exit(); MMDRV_Exit();
/* There's no guarantee the drivers haven't already been unloaded on
* process shutdown.
*/
if (!fImpLoad)
{
/* now unload all remaining drivers... */ /* now unload all remaining drivers... */
DRIVER_UnloadAll(); DRIVER_UnloadAll();
}
WINMM_DeleteIData(); WINMM_DeleteIData();
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment