Jacek Caban : conhost: Implement IOCTL_CONDRV_PEEK.
Alexandre Julliard
julliard at winehq.org
Wed Aug 26 15:24:45 CDT 2020
Module: wine
Branch: master
Commit: aef321ec0f9b54cc07071e0757c57b73210f304c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=aef321ec0f9b54cc07071e0757c57b73210f304c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Aug 25 14:53:03 2020 +0200
conhost: Implement IOCTL_CONDRV_PEEK.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/conhost/conhost.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index d65a605f04..05a160f9cc 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -213,6 +213,17 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
if (in_size % sizeof(INPUT_RECORD) || *out_size) return STATUS_INVALID_PARAMETER;
return write_console_input( console, in_data, in_size / sizeof(INPUT_RECORD) );
+ case IOCTL_CONDRV_PEEK:
+ {
+ void *result;
+ TRACE( "peek\n ");
+ if (in_size) return STATUS_INVALID_PARAMETER;
+ *out_size = min( *out_size, console->record_count * sizeof(INPUT_RECORD) );
+ if (!(result = alloc_ioctl_buffer( *out_size ))) return STATUS_NO_MEMORY;
+ if (*out_size) memcpy( result, console->records, *out_size );
+ return STATUS_SUCCESS;
+ }
+
case IOCTL_CONDRV_GET_INPUT_INFO:
{
struct condrv_input_info *info;
More information about the wine-cvs
mailing list