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
36fc962f
Commit
36fc962f
authored
Aug 14, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use IOCTL_CONDRV_GET_INPUT_INFO in GetConsoleWindow.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7444aa42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
console.c
dlls/kernel32/console.c
+6
-10
console.c
dlls/kernel32/tests/console.c
+6
-0
No files found.
dlls/kernel32/console.c
View file @
36fc962f
...
...
@@ -187,18 +187,14 @@ static BOOL restore_console_mode(HANDLE hin)
* Success: hwnd of the console window.
* Failure: NULL
*/
HWND
WINAPI
GetConsoleWindow
(
VOID
)
HWND
WINAPI
GetConsoleWindow
(
void
)
{
HWND
hWnd
=
NULL
;
SERVER_START_REQ
(
get_console_input_info
)
{
req
->
handle
=
0
;
if
(
!
wine_server_call_err
(
req
))
hWnd
=
wine_server_ptr_handle
(
reply
->
win
);
}
SERVER_END_REQ
;
struct
condrv_input_info
info
;
BOOL
ret
;
return
hWnd
;
ret
=
DeviceIoControl
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
,
IOCTL_CONDRV_GET_INPUT_INFO
,
NULL
,
0
,
&
info
,
sizeof
(
info
),
NULL
,
NULL
);
return
ret
?
(
HWND
)
info
.
win
:
NULL
;
}
...
...
dlls/kernel32/tests/console.c
View file @
36fc962f
...
...
@@ -3592,6 +3592,7 @@ static void test_FreeConsole(void)
WCHAR
title
[
16
];
HANDLE
handle
;
DWORD
size
;
HWND
hwnd
;
UINT
cp
;
BOOL
ret
;
...
...
@@ -3646,6 +3647,11 @@ static void test_FreeConsole(void)
ok
(
title
[
0
]
==
0xc0c0
,
"title byffer changed
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"last error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
hwnd
=
GetConsoleWindow
();
ok
(
!
hwnd
,
"hwnd = %p
\n
"
,
hwnd
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"last error %u
\n
"
,
GetLastError
());
if
(
!
skip_nt
)
{
SetStdHandle
(
STD_INPUT_HANDLE
,
(
HANDLE
)
0xdeadbeef
);
...
...
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