mirror of
https://github.com/reactos/reactos.git
synced 2024-11-24 03:53:31 +08:00
[BROWSEUI] Don't forget to CoInitializeEx on COM thread (#5552)
Use CoInitializeEx and CoUninitialize in CFindFolder::SearchThreadProc. CORE-19110
This commit is contained in:
parent
b9958c7be7
commit
0aa2e82c06
@ -455,6 +455,8 @@ DWORD WINAPI CFindFolder::SearchThreadProc(LPVOID lpParameter)
|
|||||||
{
|
{
|
||||||
_SearchData *data = static_cast<_SearchData*>(lpParameter);
|
_SearchData *data = static_cast<_SearchData*>(lpParameter);
|
||||||
|
|
||||||
|
HRESULT hrCoInit = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||||
|
|
||||||
data->pFindFolder->NotifyConnections(DISPID_SEARCHSTART);
|
data->pFindFolder->NotifyConnections(DISPID_SEARCHSTART);
|
||||||
|
|
||||||
UINT uTotalFound = RecursiveFind(data->szPath, data);
|
UINT uTotalFound = RecursiveFind(data->szPath, data);
|
||||||
@ -469,6 +471,9 @@ DWORD WINAPI CFindFolder::SearchThreadProc(LPVOID lpParameter)
|
|||||||
CloseHandle(data->hStopEvent);
|
CloseHandle(data->hStopEvent);
|
||||||
delete data;
|
delete data;
|
||||||
|
|
||||||
|
if (SUCCEEDED(hrCoInit))
|
||||||
|
CoUninitialize();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user