On 2/19/20 7:10 AM, Serge Gautherie wrote:
- if ((dwFlags & (RRF_SUBKEY_WOW6464KEY | RRF_SUBKEY_WOW6432KEY)) == (RRF_SUBKEY_WOW6464KEY | RRF_SUBKEY_WOW6432KEY))
return ERROR_INVALID_PARAMETER;
if (pszSubKey && pszSubKey[0]) {
ret = RegOpenKeyExW(hKey, pszSubKey, 0, KEY_QUERY_VALUE, &hKey);
REGSAM samDesired = KEY_QUERY_VALUE;
if (dwFlags & RRF_SUBKEY_WOW6464KEY)
samDesired |= KEY_WOW64_64KEY;
else if (dwFlags & RRF_SUBKEY_WOW6432KEY)
samDesired |= KEY_WOW64_32KEY;
ret = RegOpenKeyExW(hKey, pszSubKey, 0, samDesired, &hKey); if (ret != ERROR_SUCCESS) return ret; }
What does RegOpenKeyExW return for KEY_WOW64_64KEY | KEY_WOW64_32KEY? If it's ERROR_INVALID_PARAMETER, it's better to fix it there, in one place.