Commit 547855e6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

kernelbase: Use IOCTL_CONDRV_GET_OUTPUT_INFO in GetConsoleCursorInfo.

parent d25a2679
......@@ -541,26 +541,22 @@ UINT WINAPI DECLSPEC_HOTPATCH GetConsoleCP(void)
*/
BOOL WINAPI DECLSPEC_HOTPATCH GetConsoleCursorInfo( HANDLE handle, CONSOLE_CURSOR_INFO *info )
{
BOOL ret;
struct condrv_output_info condrv_info;
SERVER_START_REQ( get_console_output_info )
if (!DeviceIoControl( handle, IOCTL_CONDRV_GET_OUTPUT_INFO, NULL, 0, &condrv_info, sizeof(condrv_info), NULL, NULL ))
{
req->handle = console_handle_unmap( handle );
ret = !wine_server_call_err( req );
if (ret && info)
{
info->dwSize = reply->cursor_size;
info->bVisible = reply->cursor_visible;
}
SetLastError( ERROR_INVALID_HANDLE );
return FALSE;
}
SERVER_END_REQ;
if (!ret) return FALSE;
if (!info)
{
SetLastError( ERROR_INVALID_ACCESS );
return FALSE;
}
info->dwSize = condrv_info.cursor_size;
info->bVisible = condrv_info.cursor_visible;
TRACE("(%p) returning (%d,%d)\n", handle, info->dwSize, info->bVisible);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment