On 2/19/20 7:23 PM, Serge Gautherie wrote:
On 19/02/2020 06:42, Nikolay Sivov wrote:
What does RegOpenKeyExW return for KEY_WOW64_64KEY | KEY_WOW64_32KEY? If
I agree to review tests (and code) about those flags separately/later.
it's ERROR_INVALID_PARAMETER, it's better to fix it there, in one place.
Not in this case: flags are different, so validating them cannot be done elsewhere.
See attached diff. Specifying both flags returns ERROR_INVALID_PARAMETER. My point is that RegGetValue() could simply convert flags and rely on RegOpenKeyEx() to validate them, instead of validation in two places.