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
98bee788
Commit
98bee788
authored
Jul 23, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use IOCTL_CONDRV_WRITE_OUTPUT in CONSOLE_WriteChars.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db886f09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
console.c
dlls/kernel32/console.c
+18
-19
No files found.
dlls/kernel32/console.c
View file @
98bee788
...
...
@@ -689,25 +689,24 @@ LONG CALLBACK CONSOLE_HandleCtrlC( EXCEPTION_POINTERS *eptr )
* WriteConsoleOutput helper: hides server call semantics
* writes a string at a given pos with standard attribute
*/
static
int
CONSOLE_WriteChars
(
HANDLE
hCon
,
LPCWSTR
lpBuffer
,
int
nc
,
COORD
*
pos
)
{
int
written
=
-
1
;
if
(
!
nc
)
return
0
;
SERVER_START_REQ
(
write_console_output
)
{
req
->
handle
=
console_handle_unmap
(
hCon
);
req
->
x
=
pos
->
X
;
req
->
y
=
pos
->
Y
;
req
->
mode
=
CHAR_INFO_MODE_TEXTSTDATTR
;
req
->
wrap
=
FALSE
;
wine_server_add_data
(
req
,
lpBuffer
,
nc
*
sizeof
(
WCHAR
)
);
if
(
!
wine_server_call_err
(
req
))
written
=
reply
->
written
;
}
SERVER_END_REQ
;
if
(
written
>
0
)
pos
->
X
+=
written
;
static
int
CONSOLE_WriteChars
(
HANDLE
handle
,
const
WCHAR
*
str
,
size_t
length
,
COORD
*
coord
)
{
struct
condrv_write_output_params
*
params
;
DWORD
written
=
0
,
size
;
if
(
!
length
)
return
0
;
size
=
sizeof
(
*
params
)
+
length
*
sizeof
(
WCHAR
);
if
(
!
(
params
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
return
FALSE
;
params
->
mode
=
CHAR_INFO_MODE_TEXTSTDATTR
;
params
->
x
=
coord
->
X
;
params
->
y
=
coord
->
Y
;
params
->
width
=
0
;
memcpy
(
params
+
1
,
str
,
length
*
sizeof
(
*
str
)
);
if
(
DeviceIoControl
(
handle
,
IOCTL_CONDRV_WRITE_OUTPUT
,
params
,
size
,
&
written
,
sizeof
(
written
),
NULL
,
NULL
))
coord
->
X
+=
written
;
HeapFree
(
GetProcessHeap
(),
0
,
params
);
return
written
;
}
...
...
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