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

Alexandre Julliard julliard at winehq.org
Tue Nov 5 09:26:28 CST 2019


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



More information about the wine-devel mailing list