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
7444aa42
Commit
7444aa42
authored
Aug 14, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use IOCTL_CONDRV_GET_TITLE in GetConsoleTitleW.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
35762584
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
console.c
dlls/kernel32/tests/console.c
+9
-0
console.c
dlls/kernelbase/console.c
+8
-13
No files found.
dlls/kernel32/tests/console.c
View file @
7444aa42
...
...
@@ -3589,7 +3589,9 @@ static void test_GetConsoleScreenBufferInfoEx(HANDLE std_output)
static
void
test_FreeConsole
(
void
)
{
WCHAR
title
[
16
];
HANDLE
handle
;
DWORD
size
;
UINT
cp
;
BOOL
ret
;
...
...
@@ -3637,6 +3639,13 @@ static void test_FreeConsole(void)
ok
(
!
cp
,
"cp = %x
\n
"
,
cp
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"last error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
memset
(
title
,
0xc0
,
sizeof
(
title
)
);
size
=
GetConsoleTitleW
(
title
,
ARRAY_SIZE
(
title
)
);
ok
(
!
size
,
"GetConsoleTitleW returned %u
\n
"
,
size
);
ok
(
title
[
0
]
==
0xc0c0
,
"title byffer changed
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"last error %u
\n
"
,
GetLastError
());
if
(
!
skip_nt
)
{
SetStdHandle
(
STD_INPUT_HANDLE
,
(
HANDLE
)
0xdeadbeef
);
...
...
dlls/kernelbase/console.c
View file @
7444aa42
...
...
@@ -739,20 +739,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetConsoleScreenBufferInfoEx( HANDLE handle,
*/
DWORD
WINAPI
DECLSPEC_HOTPATCH
GetConsoleTitleW
(
LPWSTR
title
,
DWORD
size
)
{
DWORD
ret
=
0
;
if
(
!
size
)
return
0
;
SERVER_START_REQ
(
get_console_input_info
)
{
req
->
handle
=
0
;
wine_server_set_reply
(
req
,
title
,
(
size
-
1
)
*
sizeof
(
WCHAR
)
);
if
(
!
wine_server_call_err
(
req
))
{
ret
=
wine_server_reply_size
(
reply
)
/
sizeof
(
WCHAR
);
title
[
ret
]
=
0
;
}
}
SERVER_END_REQ
;
return
ret
;
if
(
!
console_ioctl
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
,
IOCTL_CONDRV_GET_TITLE
,
NULL
,
0
,
title
,
(
size
-
1
)
*
sizeof
(
WCHAR
),
&
size
))
return
0
;
size
/=
sizeof
(
WCHAR
);
title
[
size
]
=
0
;
return
size
+
1
;
}
...
...
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