advapi32: Add more RegLoadKey tests

Alexandre Julliard julliard at winehq.org
Wed Apr 27 13:12:39 CDT 2005


James Hawkins <truiken at gmail.com> writes:

> @@ -1340,7 +1340,7 @@ static void load_keys( struct key *key, 
>      if ((read_next_line( &info ) != 1) ||
>          strcmp( info.buffer, "WINE REGISTRY Version 2" ))
>      {
> -        set_error( STATUS_NOT_REGISTRY_FILE );
> +        set_error( STATUS_SUCCESS );
>          goto done;
>      }

I don't think you want to fail silently here.

> @@ -1382,6 +1382,19 @@ static void load_registry( struct key *k
>  {
>      struct file *file;
>      int fd;
> +
> +    static const WCHAR machineW[] = { 'M','A','C','H','I','N','E',0 };
> +    static const WCHAR userW[] = { 'U','S','E','R',0 };
> +
> +    if (key && key->parent)
> +    {
> +        if (strcmpiW( key->parent->name, machineW ) && 
> +            strcmpiW( key->parent->name, userW ))
> +        {
> +            set_error( STATUS_ACCESS_DENIED );
> +            return;
> +        }
> +    }

We discussed this already, we don't want to do it that way (not to
mention that keys can be named Machine or User inside the tree too, so
your test is wrong anyway).

Note that a lot of your new tests fail on XP too, so I'm not sure
there's much point in changing the Wine code to make them succeed.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list