5 Nov
2019
5 Nov
'19
3:26 p.m.
João Diogo Ferreira <devilj(a)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(a)winehq.org