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
365e99c0
Commit
365e99c0
authored
Aug 17, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Use dedicated ioctl for GetConsoleWindow.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3057388f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
console.c
dlls/kernel32/console.c
+3
-3
condrv.h
include/wine/condrv.h
+1
-1
conhost.c
programs/conhost/conhost.c
+10
-1
No files found.
dlls/kernel32/console.c
View file @
365e99c0
...
...
@@ -54,12 +54,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(console);
*/
HWND
WINAPI
GetConsoleWindow
(
void
)
{
struct
condrv_input_info
info
;
condrv_handle_t
win
;
BOOL
ret
;
ret
=
DeviceIoControl
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
,
IOCTL_CONDRV_GET_
INPUT_INFO
,
NULL
,
0
,
&
info
,
sizeof
(
info
),
NULL
,
NULL
);
return
ret
?
LongToHandle
(
info
.
win
)
:
NULL
;
IOCTL_CONDRV_GET_
WINDOW
,
NULL
,
0
,
&
win
,
sizeof
(
win
),
NULL
,
NULL
);
return
ret
?
LongToHandle
(
win
)
:
NULL
;
}
...
...
include/wine/condrv.h
View file @
365e99c0
...
...
@@ -42,6 +42,7 @@
#define IOCTL_CONDRV_CTRL_EVENT CTL_CODE(FILE_DEVICE_CONSOLE, 19, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_CONDRV_BEEP CTL_CODE(FILE_DEVICE_CONSOLE, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_CONDRV_FLUSH CTL_CODE(FILE_DEVICE_CONSOLE, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_CONDRV_GET_WINDOW CTL_CODE(FILE_DEVICE_CONSOLE, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
/* console output ioctls */
#define IOCTL_CONDRV_WRITE_CONSOLE CTL_CODE(FILE_DEVICE_CONSOLE, 30, METHOD_BUFFERED, FILE_WRITE_ACCESS)
...
...
@@ -87,7 +88,6 @@ struct condrv_input_info
unsigned
int
input_cp
;
/* console input codepage */
unsigned
int
output_cp
;
/* console output codepage */
unsigned
int
input_count
;
/* number of available input records */
condrv_handle_t
win
;
/* renderer window handle */
};
/* IOCTL_CONDRV_SET_INPUT_INFO params */
...
...
programs/conhost/conhost.c
View file @
365e99c0
...
...
@@ -2519,11 +2519,20 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
if
(
!
(
info
=
alloc_ioctl_buffer
(
sizeof
(
*
info
))))
return
STATUS_NO_MEMORY
;
info
->
input_cp
=
console
->
input_cp
;
info
->
output_cp
=
console
->
output_cp
;
info
->
win
=
condrv_handle
(
console
->
win
);
info
->
input_count
=
console
->
record_count
;
return
STATUS_SUCCESS
;
}
case
IOCTL_CONDRV_GET_WINDOW
:
{
condrv_handle_t
*
result
;
TRACE
(
"get window
\n
"
);
if
(
in_size
||
*
out_size
!=
sizeof
(
*
result
))
return
STATUS_INVALID_PARAMETER
;
if
(
!
(
result
=
alloc_ioctl_buffer
(
sizeof
(
*
result
))))
return
STATUS_NO_MEMORY
;
*
result
=
condrv_handle
(
console
->
win
);
return
STATUS_SUCCESS
;
}
case
IOCTL_CONDRV_SET_INPUT_INFO
:
{
const
struct
condrv_input_info_params
*
params
=
in_data
;
...
...
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