Skip to content

Commit

Permalink
Always use CoInitializeEx with multithread option.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent 0f62233 commit edfb9ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/win32/filed/vss_generic.c
Expand Up @@ -354,10 +354,10 @@ bool VSSClientGeneric::Initialize(DWORD dwContext, bool bDuringRestore)
HRESULT hr;
// Initialize COM
if (!m_bCoInitializeCalled) {
hr = CoInitialize(NULL);
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if (FAILED(hr)) {
Dmsg1(0, "VSSClientGeneric::Initialize: CoInitialize returned 0x%08X\n", hr);
JmsgVssApiStatus(m_jcr, M_FATAL, hr, "CoInitialize");
Dmsg1(0, "VSSClientGeneric::Initialize: CoInitializeEx returned 0x%08X\n", hr);
JmsgVssApiStatus(m_jcr, M_FATAL, hr, "CoInitializeEx");
errno = b_errno_win32;
return false;
}
Expand Down Expand Up @@ -676,7 +676,7 @@ bool VSSClientGeneric::CloseBackup()
pVssObj->Release();
m_pVssObject = NULL;

// Call CoUninitialize if the CoInitialize was performed sucesfully
// Call CoUninitialize if the CoInitializeEx was performed sucesfully
if (m_bCoInitializeCalled) {
CoUninitialize();
m_bCoInitializeCalled = false;
Expand Down

0 comments on commit edfb9ba

Please sign in to comment.