Commit c7a12a85 authored by Serge Gautherie's avatar Serge Gautherie Committed by Alexandre Julliard

advapi32/tests: Check RegGetValueA() RRF_SUBKEY_WOW64??KEY validation.

parent 7c0ba900
......@@ -772,10 +772,28 @@ static void test_get_value(void)
ok(type == REG_DWORD, "type=%d\n", type);
ok(dw == 0x12345678, "dw=%d\n", dw);
/* Check RRF_SUBKEY_WOW64*KEY validation on a case without a subkey */
ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6464KEY | RRF_SUBKEY_WOW6432KEY, NULL, NULL, NULL);
ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS), /* Before Win10 */
"ret=%d\n", ret);
ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6464KEY, NULL, NULL, NULL);
ok(ret == ERROR_SUCCESS, "ret=%d\n", ret);
ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6432KEY, NULL, NULL, NULL);
ok(ret == ERROR_SUCCESS, "ret=%d\n", ret);
/* Query by subkey-name */
ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\\Wine\\Test", "DWORD", RRF_RT_REG_DWORD, NULL, NULL, NULL);
ok(ret == ERROR_SUCCESS, "ret=%d\n", ret);
/* Check RRF_SUBKEY_WOW64*KEY validation on a case with a subkey */
ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\\Wine\\Test", "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6464KEY | RRF_SUBKEY_WOW6432KEY, NULL, NULL, NULL);
ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS), /* Before Win10 */
"ret=%d\n", ret);
ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\\Wine\\Test", "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6464KEY, NULL, NULL, NULL);
ok(ret == ERROR_SUCCESS, "ret=%d\n", ret);
ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\\Wine\\Test", "DWORD", RRF_RT_REG_DWORD | RRF_SUBKEY_WOW6432KEY, NULL, NULL, NULL);
ok(ret == ERROR_SUCCESS, "ret=%d\n", ret);
/* Query REG_DWORD using RRF_RT_REG_BINARY (restricted) */
size = type = dw = 0xdeadbeef;
ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_BINARY, &type, &dw, &size);
......
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