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
32eb41de
Commit
32eb41de
authored
Aug 17, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use IOCTL_CONDRV_SET_INPUT_INFO in SetConsoleOutputCP.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c6e0cb6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
console.c
dlls/kernel32/tests/console.c
+4
-0
console.c
dlls/kernelbase/console.c
+5
-10
No files found.
dlls/kernel32/tests/console.c
View file @
32eb41de
...
...
@@ -3645,6 +3645,10 @@ static void test_FreeConsole(void)
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"SetConsoleCP returned %x(%u)
\n
"
,
ret
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
SetConsoleOutputCP
(
GetOEMCP
());
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"SetConsoleCP returned %x(%u)
\n
"
,
ret
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
memset
(
title
,
0xc0
,
sizeof
(
title
)
);
size
=
GetConsoleTitleW
(
title
,
ARRAY_SIZE
(
title
)
);
ok
(
!
size
,
"GetConsoleTitleW returned %u
\n
"
,
size
);
...
...
dlls/kernelbase/console.c
View file @
32eb41de
...
...
@@ -1222,22 +1222,17 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleMode( HANDLE handle, DWORD mode )
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
SetConsoleOutputCP
(
UINT
cp
)
{
BOOL
ret
;
struct
condrv_input_info_params
params
=
{
SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
}
;
if
(
!
IsValidCodePage
(
cp
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
SERVER_START_REQ
(
set_console_input_info
)
{
req
->
handle
=
0
;
req
->
mask
=
SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
;
req
->
output_cp
=
cp
;
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
params
.
info
.
output_cp
=
cp
;
return
console_ioctl
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
,
IOCTL_CONDRV_SET_INPUT_INFO
,
&
params
,
sizeof
(
params
),
NULL
,
0
,
NULL
);
}
...
...
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