rpcrt4: Restore original error code when ReadFile fails with ERROR_MORE_DATA.

Sebastian Lackner sebastian at fds-team.de
Tue Jun 9 08:25:59 CDT 2015


On 09.06.2015 10:31, Alexandre Julliard wrote:
> Sebastian Lackner <sebastian at fds-team.de> writes:
> 
>> Required when named pipe messagemode is implemented.
> 
> Restoring last error is in general wrong. You'll need a better reason to
> justify this.
> 

The problem I am trying to fix with this patch occurs during connection
teardown. See for example setupapi.SetupInstallServicesFromInfSectionW, where
the error code is set before calling CloseServiceHandle(), which will send
additional RPC messages. The alternative solutions would be:
* Only restore error code for CloseServiceHandle()
* Restructure setupapi code to set the error as a last step, after calling CloseServiceHandle.

Regards,
Sebastian




More information about the wine-devel mailing list