kernelbase: Use IOCTL_CONDRV_GET_MODE in GetConsoleMode.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-07-13 13:26:40 +02:00 committed by Alexandre Julliard
parent 409160bb59
commit 48a23dbd43
2 changed files with 2 additions and 13 deletions

View File

@ -822,7 +822,7 @@ static void testScreenBuffer(HANDLE hConOut)
ret = WriteConsoleA(hFileOutWT, test_str1, lstrlenA(test_str1), &len, NULL);
error = GetLastError();
ok(!ret, "Shouldn't succeed\n");
todo_wine ok(error == ERROR_INVALID_HANDLE || error == ERROR_INVALID_FUNCTION,
ok(error == ERROR_INVALID_HANDLE || error == ERROR_INVALID_FUNCTION,
"GetLastError: got %u\n", error);
CloseHandle(hFileOutRW);

View File

@ -610,18 +610,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetConsoleInputExeNameW( DWORD len, LPWSTR buffer
*/
BOOL WINAPI DECLSPEC_HOTPATCH GetConsoleMode( HANDLE handle, DWORD *mode )
{
BOOL ret;
SERVER_START_REQ( get_console_mode )
{
req->handle = console_handle_unmap( handle );
if ((ret = !wine_server_call_err( req )))
{
if (mode) *mode = reply->mode;
}
}
SERVER_END_REQ;
return ret;
return console_ioctl( handle, IOCTL_CONDRV_GET_MODE, NULL, 0, mode, sizeof(*mode), NULL );
}