From a1e28f70d1e9a66e3c206147e873d2eb4a811c17 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 23 Aug 2013 10:30:44 +0400 Subject: [PATCH] oleaut32/tests: Some tests for QueryPathOfRegTypeLib() with activated context. --- dlls/oleaut32/tests/typelib.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index e5d61d834ff..5e15564c9d3 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1234,7 +1234,7 @@ static void test_QueryPathOfRegTypeLib(DWORD arch) for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) { - ret = QueryPathOfRegTypeLib(&uid, td[i].maj, td[i].min, 0, &path); + ret = QueryPathOfRegTypeLib(&uid, td[i].maj, td[i].min, LOCALE_NEUTRAL, &path); ok(ret == td[i].ret, "QueryPathOfRegTypeLib(%u.%u) returned %08x\n", td[i].maj, td[i].min, ret); if (ret == S_OK) { @@ -4470,6 +4470,7 @@ static void test_LoadRegTypeLib(void) HANDLE handle; ITypeLib *tl; HRESULT hr; + BSTR path; BOOL ret; if (!pActivateActCtx) @@ -4495,9 +4496,35 @@ static void test_LoadRegTypeLib(void) hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl); ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path); + ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); + ret = pActivateActCtx(handle, &cookie); ok(ret, "ActivateActCtx failed: %u\n", GetLastError()); + path = NULL; + hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path); +todo_wine + ok(hr == S_OK, "got 0x%08x\n", hr); + SysFreeString(path); + + path = NULL; + hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_en, &path); +todo_wine + ok(hr == S_OK, "got 0x%08x\n", hr); + SysFreeString(path); + + path = NULL; + hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, lcid_ru, &path); +todo_wine + ok(hr == S_OK, "got 0x%08x\n", hr); + SysFreeString(path); + + path = NULL; + hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &path); + ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr); + SysFreeString(path); + /* manifest version is 2.0, actual is 1.0 */ hr = LoadRegTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, &tl); ok(hr == TYPE_E_LIBNOTREGISTERED || broken(hr == S_OK) /* winxp */, "got 0x%08x\n", hr);