From 625a74b841194e5895198cd1cdc2991cb42bdead Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 18 Oct 2015 15:50:04 +0200
Subject: ntdll: Always use 64-bit registry view on WOW64 setups.

---
 dlls/ntdll/loadorder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/loadorder.c b/dlls/ntdll/loadorder.c
index 401d256..8a0b139 100644
--- a/dlls/ntdll/loadorder.c
+++ b/dlls/ntdll/loadorder.c
@@ -316,7 +316,7 @@ static HANDLE get_standard_key(void)
         RtlInitUnicodeString( &nameW, DllOverridesW );
 
         /* @@ Wine registry key: HKCU\Software\Wine\DllOverrides */
-        if (NtOpenKey( &std_key, KEY_ALL_ACCESS, &attr )) std_key = 0;
+        if (NtOpenKey( &std_key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr )) std_key = 0;
         NtClose( root );
     }
     return std_key;
@@ -359,7 +359,7 @@ static HANDLE get_app_key( const WCHAR *app_name )
     RtlInitUnicodeString( &nameW, str );
 
     /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\DllOverrides */
-    if (NtOpenKey( &app_key, KEY_ALL_ACCESS, &attr )) app_key = 0;
+    if (NtOpenKey( &app_key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr )) app_key = 0;
     NtClose( root );
     RtlFreeHeap( GetProcessHeap(), 0, str );
     return app_key;
-- 
2.6.1

