CPowerRenameManager::s_fileOpWorkerThread should initialize COM as STA instead of MTA. Also, CPowerRenameManager::_PerformFileOperation should return S_OK instead of 0. (#11476)
This commit is contained in:
parent
aecabc0372
commit
3262d6deff
|
@ -646,7 +646,7 @@ HRESULT CPowerRenameManager::_PerformFileOperation()
|
|||
_OnRenameCompleted();
|
||||
}
|
||||
|
||||
return 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPowerRenameManager::_CreateFileOpWorkerThread()
|
||||
|
@ -676,7 +676,7 @@ HRESULT CPowerRenameManager::_CreateFileOpWorkerThread()
|
|||
|
||||
DWORD WINAPI CPowerRenameManager::s_fileOpWorkerThread(_In_ void* pv)
|
||||
{
|
||||
if (SUCCEEDED(CoInitializeEx(NULL, 0)))
|
||||
if (SUCCEEDED(CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)))
|
||||
{
|
||||
WorkerThreadData* pwtd = reinterpret_cast<WorkerThreadData*>(pv);
|
||||
if (pwtd)
|
||||
|
|
Loading…
Reference in a new issue