Commit 679e3a9d authored by Shaun Ren's avatar Shaun Ren Committed by Alexandre Julliard

sapi: Call CoInitializeEx/CoUninitialize in async_worker.

parent f54646d7
......@@ -71,6 +71,7 @@ static void CALLBACK async_worker(TP_CALLBACK_INSTANCE *instance, void *ctx)
HANDLE handles[2] = { queue->cancel, queue->wait };
DWORD ret;
CoInitializeEx(NULL, COINIT_MULTITHREADED);
SetEvent(queue->ready);
for (;;)
......@@ -99,6 +100,7 @@ static void CALLBACK async_worker(TP_CALLBACK_INSTANCE *instance, void *ctx)
cancel:
async_empty_queue(queue);
CoUninitialize();
TRACE("cancelled.\n");
SetEvent(queue->ready);
}
......
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