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

Serge Gautherie winehq-git_serge_180711 at gautherie.fr
Wed Feb 19 15:18:44 CST 2020


On 19/02/2020 18:35, Nikolay Sivov wrote:

> See attached diff. Specifying both flags returns ERROR_INVALID_PARAMETER.

I think this is exactly why that should never be done intentionally, but 
on tests.

> My point is that RegGetValue() could simply
> convert flags and rely on RegOpenKeyEx() to validate them, instead of
> validation in two places.

I would agree with you if flags were implicitly passed through, which is 
not the case here.

My point is:
*No redundancy here: 2 functions, 2 sets of flags, 2 validations.
*What if flag conversion is broken?
*What when RegOpenKeyEx() is not called? (See tests on PATCH 2/2.)

-- 



More information about the wine-devel mailing list