Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ab6056d6
Commit
ab6056d6
authored
Sep 11, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use IOCTL_CONDRV_WRITE_CONSOLE in WriteConsoleW when possible.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5ced4a70
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
console.c
dlls/kernel32/console.c
+7
-0
console.c
server/console.c
+7
-2
trace.c
server/trace.c
+1
-0
No files found.
dlls/kernel32/console.c
View file @
ab6056d6
...
...
@@ -794,6 +794,13 @@ BOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber
if
(
lpNumberOfCharsWritten
)
*
lpNumberOfCharsWritten
=
0
;
if
(
DeviceIoControl
(
hConsoleOutput
,
IOCTL_CONDRV_WRITE_CONSOLE
,
(
void
*
)
lpBuffer
,
nNumberOfCharsToWrite
*
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
,
NULL
))
{
if
(
lpNumberOfCharsWritten
)
*
lpNumberOfCharsWritten
=
nNumberOfCharsToWrite
;
return
TRUE
;
}
if
((
fd
=
get_console_bare_fd
(
hConsoleOutput
))
!=
-
1
)
{
char
*
ptr
;
...
...
server/console.c
View file @
ab6056d6
...
...
@@ -2106,8 +2106,13 @@ static int screen_buffer_ioctl( struct fd *fd, ioctl_code_t code, struct async *
}
default:
set_error
(
STATUS_INVALID_HANDLE
);
return
0
;
if
(
!
screen_buffer
->
input
||
!
screen_buffer
->
input
->
server
||
code
>>
16
!=
FILE_DEVICE_CONSOLE
)
{
set_error
(
STATUS_INVALID_HANDLE
);
return
0
;
}
return
queue_host_ioctl
(
screen_buffer
->
input
->
server
,
code
,
screen_buffer
->
id
,
async
,
&
screen_buffer
->
ioctl_q
);
}
}
...
...
server/trace.c
View file @
ab6056d6
...
...
@@ -128,6 +128,7 @@ static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
CASE
(
IOCTL_CONDRV_READ_OUTPUT
);
CASE
(
IOCTL_CONDRV_SET_MODE
);
CASE
(
IOCTL_CONDRV_SET_OUTPUT_INFO
);
CASE
(
IOCTL_CONDRV_WRITE_CONSOLE
);
CASE
(
IOCTL_CONDRV_WRITE_INPUT
);
CASE
(
IOCTL_CONDRV_WRITE_OUTPUT
);
CASE
(
FSCTL_DISMOUNT_VOLUME
);
...
...
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