Commit cb28c2db authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Introduce IOCTL_CONDRV_SET_TITLE ioctl.

parent 2cfc85dc
......@@ -34,6 +34,7 @@
#define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES)
#define IOCTL_CONDRV_SET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 14, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
#define IOCTL_CONDRV_GET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 15, METHOD_BUFFERED, FILE_READ_PROPERTIES)
#define IOCTL_CONDRV_SET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 16, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
/* console output ioctls */
#define IOCTL_CONDRV_GET_OUTPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 32, METHOD_BUFFERED, FILE_READ_PROPERTIES)
......
......@@ -1610,6 +1610,27 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
if (!console->title_len) return 1;
return set_reply_data( console->title, min( console->title_len, get_reply_max_size() )) != NULL;
case IOCTL_CONDRV_SET_TITLE:
{
data_size_t len = get_req_data_size();
struct condrv_renderer_event evt;
WCHAR *title = NULL;
if (len % sizeof(WCHAR))
{
set_error( STATUS_INVALID_PARAMETER );
return 0;
}
if (len && !(title = memdup( get_req_data(), len ))) return 0;
free( console->title );
console->title = title;
console->title_len = len;
evt.event = CONSOLE_RENDERER_TITLE_EVENT;
console_input_events_append( console, &evt );
return 1;
}
default:
set_error( STATUS_INVALID_HANDLE );
return 0;
......
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