Module: wine Branch: master Commit: 7565d61403fcb1e784eb5304273c075e499e317c URL: https://gitlab.winehq.org/wine/wine/-/commit/7565d61403fcb1e784eb5304273c075...
Author: Sven Baars sbaars@codeweavers.com Date: Sat Dec 23 14:15:02 2023 +0100
advapi32/tests: Introduce a new has_wow64 helper.
---
dlls/advapi32/tests/registry.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 30a79368c94..27b33194fc4 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -64,6 +64,17 @@ static DWORD (WINAPI *pEnumDynamicTimeZoneInformation)(const DWORD, static BOOL limited_user; static const BOOL is_64bit = sizeof(void *) > sizeof(int);
+static BOOL has_wow64(void) +{ + if (!is_64bit) + { + BOOL is_wow64; + if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 ) || !is_wow64) + return FALSE; + } + return TRUE; +} + static const char *dbgstr_SYSTEMTIME(const SYSTEMTIME *st) { return wine_dbg_sprintf("%02d-%02d-%04d %02d:%02d:%02d.%03d", @@ -2575,14 +2586,10 @@ static void test_redirection(void) HKEY key, key32, key64, root, root32, root64; DWORD subkeys, subkeys32, subkeys64;
- if (ptr_size != 64) + if (!has_wow64()) { - BOOL is_wow64; - if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 ) || !is_wow64) - { - skip( "Not on Wow64, no redirection\n" ); - return; - } + skip( "Not on Wow64, no redirection\n" ); + return; }
if (limited_user)