sapi: Call CoInitializeEx/CoUninitialize in async_worker.
This commit is contained in:
parent
f54646d7a9
commit
679e3a9d00
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue