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