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