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

conhost: Implement IOCTL_CONDRV_GET_TITLE.

parent 6c7f389c
...@@ -46,6 +46,8 @@ struct console ...@@ -46,6 +46,8 @@ struct console
HANDLE server; /* console server handle */ HANDLE server; /* console server handle */
unsigned int mode; /* input mode */ unsigned int mode; /* input mode */
unsigned int recnum; /* number of input records */ unsigned int recnum; /* number of input records */
WCHAR *title; /* console title */
size_t title_len; /* length of console title */
struct history_line **history; /* lines history */ struct history_line **history; /* lines history */
unsigned int history_size; /* number of entries in history array */ unsigned int history_size; /* number of entries in history array */
unsigned int history_index; /* number of used entries in history array */ unsigned int history_index; /* number of used entries in history array */
...@@ -166,6 +168,18 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code, ...@@ -166,6 +168,18 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
case IOCTL_CONDRV_GET_TITLE:
{
WCHAR *result;
if (in_size) return STATUS_INVALID_PARAMETER;
TRACE( "returning title %s\n", debugstr_wn(console->title,
console->title_len / sizeof(WCHAR)) );
if (!(result = alloc_ioctl_buffer( *out_size = min( *out_size, console->title_len ))))
return STATUS_NO_MEMORY;
if (*out_size) memcpy( result, console->title, *out_size );
return STATUS_SUCCESS;
}
default: default:
FIXME( "unsupported ioctl %x\n", code ); FIXME( "unsupported ioctl %x\n", code );
return STATUS_NOT_SUPPORTED; return STATUS_NOT_SUPPORTED;
......
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