[PATCH 2/4] kernel32: Use IOCTL_CONDRV_WRITE_CONSOLE in WriteConsoleW when possible.
Jacek Caban
jacek at codeweavers.com
Tue Sep 15 06:14:17 CDT 2020
Hi Carlos,
On 15.09.2020 12:01, Carlos Rivera wrote:
> Hi,
> There is a test in dlls/kernel32/tests/profile.c that contains the following:
>
> ret=GetPrivateProfileSection("section3", buf, sizeof(buf), testfile4);
> trace("section 3 return: %s\n", buf);
> ok(GetLastError() == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", GetLastError());
>
> The ok macro now fails in my machine (it doesn't here though: https://test.winehq.org/data/01bacebba418bf6f58a644b1aab41be215bd200a/linux_newtb-debiant-wow64/kernel32:profile.html)
>
> I have traced it back to this commit. It seems that the trace call sets last error to STATUS_INVALID_HANDLE since the
> introduction of this patch, If I change trace by a call to printf it does the same thing.
>
> I see that the invalid handle is sent all the way from the server:
>
> WriteConsoleW
> DeviceIoControl
> NtDeviceIoControl
> server_ioctl_file
>
>
> I understand that checking for last error should be done right after calling the function to be tested
> anyway. But I wanted to let you know about this, since it seems a little strange, I do not know anything
> about how the console works, maybe something is broken in my setup? The trace shows up anyway despite
> setting last error.
The attached patch should help, please give it a try.
Thanks,
Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 2447 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200915/bd90d4e0/attachment.bin>
More information about the wine-devel
mailing list