Commit 90a6c9bd authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32: Fix CoGetApartmentType() return value for implicit MTA case.

parent c18d2d1c
......@@ -5264,6 +5264,7 @@ HRESULT WINAPI CoGetApartmentType(APTTYPE *type, APTTYPEQUALIFIER *qualifier)
apartment_release(apt);
*type = APTTYPE_MTA;
*qualifier = APTTYPEQUALIFIER_IMPLICIT_MTA;
return S_OK;
}
return info->apt ? S_OK : CO_E_NOTINITIALIZED;
......
......@@ -648,7 +648,8 @@ static void _test_apt_type(APTTYPE expected_type, APTTYPEQUALIFIER expected_qual
return;
hr = pCoGetApartmentType(&type, &qualifier);
ok_(__FILE__, line)(hr == S_OK || hr == CO_E_NOTINITIALIZED, "Unexpected return code: 0x%08x\n", hr);
ok_(__FILE__, line)(hr == S_OK || (type == APTTYPE_CURRENT && hr == CO_E_NOTINITIALIZED),
"Unexpected hr %#x.\n", hr);
ok_(__FILE__, line)(type == expected_type, "Wrong apartment type %d, expected %d\n", type, expected_type);
ok_(__FILE__, line)(qualifier == expected_qualifier, "Wrong apartment qualifier %d, expected %d\n", qualifier,
expected_qualifier);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment