<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div>
<meta content="text/html; charset=iso-8859-1">
</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255); text-align:left">
<span style="font-size: 1em;">Got it. I suppose the same is true of an </span><span style="font-size: 1em;">unverified</span><br>
</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255); text-align:left">
<span style="font-size: 1em;">ERROR_BADDB in patch #4, as well as an improvised</span></div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255); text-align:left">
<span style="font-size: 1em;">ERROR_INSUFFICIENT_MEMORY in that same patch.</span></div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255); text-align:left">
<br>
</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255); text-align:left">
<span style="font-size: 1em;">I'll fix all these ASAP. Thanks for reviewing.</span></div>
<div id="ms-outlook-mobile-signature" dir="auto" style="text-align: left;">
<div><br>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Alexandre Julliard <julliard@winehq.org><br>
<b>Sent:</b> Tuesday, November 5, 2019 4:26:28 PM<br>
<b>To:</b> Jo�o Diogo Ferreira <devilj@outlook.pt><br>
<b>Cc:</b> wine-devel@winehq.org <wine-devel@winehq.org><br>
<b>Subject:</b> Re: [PATCH v4 2/7] kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Jo�o Diogo Ferreira <devilj@outlook.pt> writes:<br>
<br>
> -    if (!(hkey = create_registry_key())) return FALSE;<br>
> +    if (!geoinfo)<br>
> +    {<br>
> +        SetLastError(ERROR_INVALID_PARAMETER);<br>
> +        return FALSE;<br>
> +    }<br>
> +    if (!(hkey = create_registry_key()))<br>
> +    {<br>
> +        SetLastError(ERROR_INTERNAL_ERROR);<br>
> +        return FALSE;<br>
> +    }<br>
<br>
It's not useful to set last error, especially not to a meaningless value<br>
like ERROR_INTERNAL_ERROR, unless there are test cases demonstrating<br>
that Windows does the same thing.<br>
<br>
> +    if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS)<br>
>      {<br>
>          NtClose(attr.RootDirectory);<br>
> +        SetLastError(ERROR_INTERNAL_ERROR);<br>
<br>
Same here.<br>
<br>
-- <br>
Alexandre Julliard<br>
julliard@winehq.org<br>
</div>
</span></font></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Alexandre Julliard <julliard@winehq.org><br>
<b>Sent:</b> Tuesday, November 5, 2019 4:26:28 PM<br>
<b>To:</b> Jo�o Diogo Ferreira <devilj@outlook.pt><br>
<b>Cc:</b> wine-devel@winehq.org <wine-devel@winehq.org><br>
<b>Subject:</b> Re: [PATCH v4 2/7] kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Jo�o Diogo Ferreira <devilj@outlook.pt> writes:<br>
<br>
> -    if (!(hkey = create_registry_key())) return FALSE;<br>
> +    if (!geoinfo)<br>
> +    {<br>
> +        SetLastError(ERROR_INVALID_PARAMETER);<br>
> +        return FALSE;<br>
> +    }<br>
> +    if (!(hkey = create_registry_key()))<br>
> +    {<br>
> +        SetLastError(ERROR_INTERNAL_ERROR);<br>
> +        return FALSE;<br>
> +    }<br>
<br>
It's not useful to set last error, especially not to a meaningless value<br>
like ERROR_INTERNAL_ERROR, unless there are test cases demonstrating<br>
that Windows does the same thing.<br>
<br>
> +    if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS)<br>
>      {<br>
>          NtClose(attr.RootDirectory);<br>
> +        SetLastError(ERROR_INTERNAL_ERROR);<br>
<br>
Same here.<br>
<br>
-- <br>
Alexandre Julliard<br>
julliard@winehq.org<br>
</div>
</span></font></div>
</body>
</html>