Fix a race condition in the mmdevapi message queue thread
This commit is contained in:
parent
09d1319e82
commit
29e0af5ef0
@ -600,6 +600,12 @@ static DWORD CALLBACK MMDevApiMsgProc(void *ptr)
|
||||
|
||||
CoUninitialize();
|
||||
|
||||
/* HACK: Force Windows to create a message queue for this thread before
|
||||
* returning success, otherwise PostThreadMessage may fail if it gets
|
||||
* called before GetMessage.
|
||||
*/
|
||||
PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
|
||||
|
||||
TRACE("Message thread initialization complete\n");
|
||||
req->result = S_OK;
|
||||
SetEvent(req->FinishedEvt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user