[PATCH v4 2/7] kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID.

João Diogo Ferreira devilj at outlook.pt
Tue Nov 5 15:36:04 CST 2019


Got it. I suppose the same is true of an unverified
ERROR_BADDB in patch #4, as well as an improvised
ERROR_INSUFFICIENT_MEMORY in that same patch.

I'll fix all these ASAP. Thanks for reviewing.

________________________________
From: Alexandre Julliard <julliard at winehq.org>
Sent: Tuesday, November 5, 2019 4:26:28 PM
To: João Diogo Ferreira <devilj at outlook.pt>
Cc: wine-devel at winehq.org <wine-devel at winehq.org>
Subject: Re: [PATCH v4 2/7] kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID.

João Diogo Ferreira <devilj at outlook.pt> writes:

> -    if (!(hkey = create_registry_key())) return FALSE;
> +    if (!geoinfo)
> +    {
> +        SetLastError(ERROR_INVALID_PARAMETER);
> +        return FALSE;
> +    }
> +    if (!(hkey = create_registry_key()))
> +    {
> +        SetLastError(ERROR_INTERNAL_ERROR);
> +        return FALSE;
> +    }

It's not useful to set last error, especially not to a meaningless value
like ERROR_INTERNAL_ERROR, unless there are test cases demonstrating
that Windows does the same thing.

> +    if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS)
>      {
>          NtClose(attr.RootDirectory);
> +        SetLastError(ERROR_INTERNAL_ERROR);

Same here.

--
Alexandre Julliard
julliard at winehq.org
________________________________
From: Alexandre Julliard <julliard at winehq.org>
Sent: Tuesday, November 5, 2019 4:26:28 PM
To: João Diogo Ferreira <devilj at outlook.pt>
Cc: wine-devel at winehq.org <wine-devel at winehq.org>
Subject: Re: [PATCH v4 2/7] kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID.

João Diogo Ferreira <devilj at outlook.pt> writes:

> -    if (!(hkey = create_registry_key())) return FALSE;
> +    if (!geoinfo)
> +    {
> +        SetLastError(ERROR_INVALID_PARAMETER);
> +        return FALSE;
> +    }
> +    if (!(hkey = create_registry_key()))
> +    {
> +        SetLastError(ERROR_INTERNAL_ERROR);
> +        return FALSE;
> +    }

It's not useful to set last error, especially not to a meaningless value
like ERROR_INTERNAL_ERROR, unless there are test cases demonstrating
that Windows does the same thing.

> +    if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS)
>      {
>          NtClose(attr.RootDirectory);
> +        SetLastError(ERROR_INTERNAL_ERROR);

Same here.

--
Alexandre Julliard
julliard at winehq.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20191105/d8031e26/attachment.htm>


More information about the wine-devel mailing list