https://bugs.winehq.org/show_bug.cgi?id=37017
Bug ID: 37017 Summary: KEY_WOW64_32KEY doesn't work properly after opening HKLM\Software key. Product: Wine Version: 1.7.23 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: advapi32 Assignee: wine-bugs@winehq.org Reporter: sagawa.aki+winebugs@gmail.com
Created attachment 49185 --> https://bugs.winehq.org/attachment.cgi?id=49185 proof of concept
I noticed that following scenario doesn't work properly on 64-bit executable.
Step 1. Open or create HKEY_LOCAL_MACHINE\Software with KEY_WOW64_32KEY. e.g. RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software", 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &key). Step 2. Open or create a subkey of the above key with KEY_WOW64_32KEY. e.g. RegOpenKeyEx( key, "Wine\Winetest", 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &subkey) Step 3. Get the value of the key.
Expected behavior is obtaining 32-bit view value in step 3. But, currently wine returns 64-bit view value then. Opening directly, i.e. RegOpenKeyEx(HKLM, "Software\Wine\Winetest", 0, KEY_WOW64_32KEY...), works as expected.
I wrote proof of concepts for 1.7.23. See the attachment for details. I'm working on this issue.