The native API does not offer an equivalent to KEY_WOW64_32KEY
. Your options are:
- Use the Win32 API.
- Stick with native API and hard code the path.
- Mix the Win32 and native APIs. Use the Win32 API to open
HKLM\Software
withKEY_WOW64_32KEY
. Then callNtQueryKey
to find out the native name of the key. And then use the native API from there on. This gets around your objection to hard coding.
Option 3 sounds plausible, but I've never called NtQueryKey
and can't even be sure that the idea works.