Module: wine Branch: master Commit: e40de801b5e757f13e5d699fa22368bf1939d444 URL: https://source.winehq.org/git/wine.git/?a=commit;h=e40de801b5e757f13e5d699fa...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Aug 24 13:21:43 2020 +0200
conhost: Implement IOCTL_CONDRV_GET_TITLE.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/conhost/conhost.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 87d3a646d9..7f1978bffb 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -46,6 +46,8 @@ struct console HANDLE server; /* console server handle */ unsigned int mode; /* input mode */ 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 */ unsigned int history_size; /* number of 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, 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: FIXME( "unsupported ioctl %x\n", code ); return STATUS_NOT_SUPPORTED;