[PATCH 1/2] kernelbase: Handle RegGetValue() RRF_SUBKEY_WOW64*KEY flags.

Nikolay Sivov nsivov at codeweavers.com
Tue Feb 18 23:42:38 CST 2020


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.



More information about the wine-devel mailing list