Rémi Bernon (@rbernon) commented about dlls/mmdevapi/main.c:
params.err = &err; MIDI_CALL( midi_init, ¶ms );
if (err == DRV_SUCCESS) CloseHandle( CreateThread( NULL, 0, notify_thread, NULL, 0, NULL ));
} case DRV_FREE: MIDI_CALL( midi_release, NULL );if (err == DRV_SUCCESS) notify_thread_handle = CreateThread( NULL, 0, notify_thread, NULL, 0, NULL ); return err;
WaitForSingleObject(notify_thread_handle, INFINITE);
CloseHandle(notify_thread_handle);
notify_thread_handle = NULL;
```suggestion:-2+0 WaitForSingleObject( notify_thread_handle, INFINITE ); CloseHandle( notify_thread_handle ); notify_thread_handle = NULL; ```