[PATCH 02/16] rpcrt4: Restore original error code when ReadFile fails with ERROR_MORE_DATA.
Jacek Caban
jacek at codeweavers.com
Thu Oct 6 08:06:58 CDT 2016
On 06.10.2016 14:27, Alexandre Julliard wrote:
> Jacek Caban <jacek at codeweavers.com> writes:
>
>> @@ -448,6 +448,7 @@ static int rpcrt4_conn_np_read(RpcConnection *Connection,
>> char *buf = buffer;
>> BOOL ret = TRUE;
>> unsigned int bytes_left = count;
>> + DWORD err = GetLastError();
>>
>> while (bytes_left)
>> {
>> @@ -460,6 +461,7 @@ static int rpcrt4_conn_np_read(RpcConnection *Connection,
>> bytes_left -= bytes_read;
>> buf += bytes_read;
>> }
>> + if (ret) SetLastError(err);
> I'd suggest using NtReadFile instead.
Good point, thanks. I sent an updated patch. It seems to me that we
could even get rid the loop here once message mode support is in (but it
would need closer look at rpcrt4 first).
Thanks,
Jacek
More information about the wine-devel
mailing list