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
57a22235
Commit
57a22235
authored
Aug 13, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Set PEB console handle in AllocConsole.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ccaaf695
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
console.c
dlls/kernel32/tests/console.c
+0
-1
console.c
dlls/kernelbase/console.c
+5
-1
No files found.
dlls/kernel32/tests/console.c
View file @
57a22235
...
...
@@ -3592,7 +3592,6 @@ static void test_FreeConsole(void)
HANDLE
handle
;
BOOL
ret
;
todo_wine
ok
(
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
!=
NULL
,
"ConsoleHandle is NULL
\n
"
);
ret
=
FreeConsole
();
...
...
dlls/kernelbase/console.c
View file @
57a22235
...
...
@@ -266,7 +266,7 @@ BOOL WINAPI AllocConsole(void)
STARTUPINFOW
app_si
,
console_si
;
WCHAR
buffer
[
1024
],
cmd
[
256
];
PROCESS_INFORMATION
pi
;
HANDLE
event
,
std_in
;
HANDLE
event
,
std_in
,
console
;
DWORD
mode
;
BOOL
ret
;
...
...
@@ -324,6 +324,10 @@ BOOL WINAPI AllocConsole(void)
}
CloseHandle
(
event
);
if
(
!
ret
||
!
init_console_std_handles
())
goto
error
;
console
=
CreateFileW
(
L"CONIN$"
,
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
console
==
INVALID_HANDLE_VALUE
)
goto
error
;
RtlGetCurrentPeb
()
->
ProcessParameters
->
ConsoleHandle
=
console
;
TRACE
(
"Started wineconsole pid=%08x tid=%08x
\n
"
,
pi
.
dwProcessId
,
pi
.
dwThreadId
);
RtlLeaveCriticalSection
(
&
console_section
);
...
...
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