Huw Davies : wshom/tests: Use RegQueryValueEx so that the tests run on Win 2k and XP.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 10 10:09:19 CDT 2015


Module: wine
Branch: master
Commit: 714abcb7cdd8cab7d9383bded5b5426e55d98791
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=714abcb7cdd8cab7d9383bded5b5426e55d98791

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Jun 10 15:14:21 2015 +0100

wshom/tests: Use RegQueryValueEx so that the tests run on Win 2k and XP.

---

 dlls/wshom.ocx/tests/wshom.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/wshom.ocx/tests/wshom.c b/dlls/wshom.ocx/tests/wshom.c
index 46ffc58..a3d398e 100644
--- a/dlls/wshom.ocx/tests/wshom.c
+++ b/dlls/wshom.ocx/tests/wshom.c
@@ -223,7 +223,8 @@ if (0) /* crashes on native */
     SysFreeString(str);
 
     hr = IWshShell3_put_CurrentDirectory(sh3, NULL);
-    ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+    ok(hr == E_INVALIDARG ||
+       broken(hr == HRESULT_FROM_WIN32(ERROR_NOACCESS)), "got 0x%08x\n", hr);
 
     str = SysAllocString(emptyW);
     hr = IWshShell3_put_CurrentDirectory(sh3, str);
@@ -490,7 +491,7 @@ static void test_registry(void)
     ok(hr == S_OK, "got 0x%08x\n", hr);
 
     type = REG_NONE;
-    ret = RegGetValueA(root, NULL, "regsz", RRF_RT_ANY, &type, NULL, NULL);
+    ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
     ok(ret == ERROR_SUCCESS, "got %d\n", ret);
     ok(type == REG_SZ, "got %d\n", type);
 
@@ -503,7 +504,7 @@ static void test_registry(void)
     VariantClear(&value);
 
     type = REG_NONE;
-    ret = RegGetValueA(root, NULL, "regsz", RRF_RT_ANY, &type, NULL, NULL);
+    ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
     ok(ret == ERROR_SUCCESS, "got %d\n", ret);
     ok(type == REG_SZ, "got %d\n", type);
 
@@ -516,7 +517,7 @@ static void test_registry(void)
     VariantClear(&value);
 
     type = REG_NONE;
-    ret = RegGetValueA(root, NULL, "regsz", RRF_RT_ANY, &type, NULL, NULL);
+    ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
     ok(ret == ERROR_SUCCESS, "got %d\n", ret);
     ok(type == REG_SZ, "got %d\n", type);
 




More information about the wine-cvs mailing list