ole32/tests: Add more tests for CoIncrementMTAUsage/CoDecrementMTAUsage.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2021-07-28 16:43:49 +03:00 committed by Alexandre Julliard
parent 9e4524ffb0
commit 251ab17af7

View file

@ -4098,6 +4098,25 @@ static void test_mta_usage(void)
ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE); test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE);
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE);
cookie = 0;
hr = pCoIncrementMTAUsage(&cookie);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(cookie != NULL, "Unexpected cookie %p.\n", cookie);
test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE);
hr = pCoDecrementMTAUsage(cookie);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
CoUninitialize();
test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE);
} }
static void test_CoCreateInstanceFromApp(void) static void test_CoCreateInstanceFromApp(void)