diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index c612f335e9d..6bf79fdb507 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -190,6 +190,9 @@ HRESULT WINAPI OleInitialize(LPVOID reserved) if (FAILED(hr)) return hr; + if (!COM_CurrentInfo()->ole_inits) + hr = S_OK; + /* * Then, it has to initialize the OLE specific modules. * This includes: diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 442e7b0b323..5ddfc11fc79 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -1415,7 +1415,7 @@ static void test_CoInitializeEx(void) /* Calling OleInitialize for the first time should yield S_OK even with * apartment already initialized by previous CoInitialize(Ex) calls. */ hr = OleInitialize(NULL); - todo_wine ok(hr == S_OK, "OleInitialize failed with error 0x%08x\n", hr); + ok(hr == S_OK, "OleInitialize failed with error 0x%08x\n", hr); /* Subsequent calls to OleInitialize should return S_FALSE */ hr = OleInitialize(NULL);