ole32: OleInitialize should return S_OK if it is called for the first time on a thread independently of CoInitializeEx.
This commit is contained in:
parent
d168f71912
commit
932544d34c
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue