Module: wine Branch: master Commit: b1a9039c17f5826a4350e4fd5cd50332b0d9d473 URL: https://gitlab.winehq.org/wine/wine/-/commit/b1a9039c17f5826a4350e4fd5cd5033...
Author: Sven Baars sbaars@codeweavers.com Date: Fri Sep 23 15:23:52 2022 +0200
ntdll/tests: Test that NtCreateKeyEx() also recursively obtains the Wow6432Node parent.
---
dlls/ntdll/tests/reg.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 383397bd9da..fb08a4e5650 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -1648,6 +1648,22 @@ static void test_redirection(void) ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status ); pNtClose( key64 );
+ pRtlInitUnicodeString( &str, L"Winetest" ); + attr.RootDirectory = root64; + status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); + ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08lx\n", status ); + + pRtlInitUnicodeString( &str, L"\Registry\Machine\Software\Wow6432Node\Wine\Winetest" ); + attr.RootDirectory = 0; + status = pNtOpenKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr ); + ok( status == (ptr_size == 64 ? STATUS_OBJECT_NAME_NOT_FOUND : STATUS_SUCCESS), + "NtOpenKey failed: 0x%08lx\n", status ); + pNtClose( key ); + + status = pNtDeleteKey( key32 ); + ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08lx\n", status ); + pNtClose( key32 ); + pNtDeleteKey( root32 ); pNtClose( root32 ); pNtDeleteKey( root64 );