advapi32/tests: Check RegGetValueA() RRF_SUBKEY_WOW64??KEY validation.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7c0ba9007a
commit
c7a12a851b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue