Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
640773aa
Commit
640773aa
authored
Jul 07, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use ioctl for WriteConsoleInputW implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d04baa29
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
console.c
dlls/kernelbase/console.c
+7
-14
condrv.h
include/wine/condrv.h
+1
-0
console.c
server/console.c
+3
-0
No files found.
dlls/kernelbase/console.c
View file @
640773aa
...
...
@@ -1501,9 +1501,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleInputA( HANDLE handle, const INPUT_REC
BOOL
WINAPI
DECLSPEC_HOTPATCH
WriteConsoleInputW
(
HANDLE
handle
,
const
INPUT_RECORD
*
buffer
,
DWORD
count
,
DWORD
*
written
)
{
DWORD
events_written
=
0
;
BOOL
ret
;
TRACE
(
"(%p,%p,%d,%p)
\n
"
,
handle
,
buffer
,
count
,
written
);
if
(
count
>
0
&&
!
buffer
)
...
...
@@ -1511,21 +1508,17 @@ BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleInputW( HANDLE handle, const INPUT_REC
SetLastError
(
ERROR_INVALID_ACCESS
);
return
FALSE
;
}
SERVER_START_REQ
(
write_console_input
)
{
req
->
handle
=
console_handle_unmap
(
handle
);
wine_server_add_data
(
req
,
buffer
,
count
*
sizeof
(
INPUT_RECORD
)
);
if
((
ret
=
!
wine_server_call_err
(
req
)))
events_written
=
reply
->
written
;
}
SERVER_END_REQ
;
if
(
written
)
*
written
=
events_written
;
else
if
(
!
DeviceIoControl
(
handle
,
IOCTL_CONDRV_WRITE_INPUT
,
(
void
*
)
buffer
,
count
*
sizeof
(
*
buffer
),
NULL
,
0
,
NULL
,
NULL
))
return
FALSE
;
if
(
!
written
)
{
SetLastError
(
ERROR_INVALID_ACCESS
);
ret
=
FALSE
;
ret
urn
FALSE
;
}
return
ret
;
*
written
=
count
;
return
TRUE
;
}
...
...
include/wine/condrv.h
View file @
640773aa
...
...
@@ -25,6 +25,7 @@
/* console input ioctls */
#define IOCTL_CONDRV_READ_INPUT CTL_CODE(FILE_DEVICE_CONSOLE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_CONDRV_WRITE_INPUT CTL_CODE(FILE_DEVICE_CONSOLE, 11, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
#define IOCTL_CONDRV_PEEK CTL_CODE(FILE_DEVICE_CONSOLE, 12, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES)
...
...
server/console.c
View file @
640773aa
...
...
@@ -1537,6 +1537,9 @@ static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async
return
read_console_input
(
console
,
async
,
1
);
}
case
IOCTL_CONDRV_WRITE_INPUT
:
return
write_console_input
(
console
,
get_req_data_size
()
/
sizeof
(
INPUT_RECORD
),
get_req_data
()
)
!=
-
1
;
case
IOCTL_CONDRV_PEEK
:
if
(
get_reply_max_size
()
%
sizeof
(
INPUT_RECORD
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment