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
736d96b5
Commit
736d96b5
authored
Oct 31, 2003
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Oct 31, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Duplicate stdin/stdout handles to avoid closing them when library is
unloaded.
parent
84ad10bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
console.c
dlls/msvcrt/console.c
+2
-1
file.c
dlls/msvcrt/file.c
+6
-3
No files found.
dlls/msvcrt/console.c
View file @
736d96b5
...
...
@@ -47,7 +47,8 @@ void msvcrt_init_console(void)
{
TRACE
(
":Opening console handles
\n
"
);
MSVCRT_console_in
=
GetStdHandle
(
STD_INPUT_HANDLE
);
DuplicateHandle
(
GetCurrentProcess
(),
GetStdHandle
(
STD_INPUT_HANDLE
),
GetCurrentProcess
(),
&
MSVCRT_console_in
,
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
);
/* FIXME: Should be initialised with:
* CreateFileA("CONIN$", GENERIC_READ, FILE_SHARE_READ,
...
...
dlls/msvcrt/file.c
View file @
736d96b5
...
...
@@ -204,11 +204,14 @@ void msvcrt_init_io(void)
{
int
i
;
memset
(
MSVCRT__iob
,
0
,
3
*
sizeof
(
MSVCRT_FILE
));
MSVCRT_handles
[
0
]
=
GetStdHandle
(
STD_INPUT_HANDLE
);
DuplicateHandle
(
GetCurrentProcess
(),
GetStdHandle
(
STD_INPUT_HANDLE
),
GetCurrentProcess
(),
&
MSVCRT_handles
[
0
],
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
);
MSVCRT_flags
[
0
]
=
MSVCRT__iob
[
0
].
_flag
=
MSVCRT__IOREAD
;
MSVCRT_handles
[
1
]
=
GetStdHandle
(
STD_OUTPUT_HANDLE
);
DuplicateHandle
(
GetCurrentProcess
(),
GetStdHandle
(
STD_OUTPUT_HANDLE
),
GetCurrentProcess
(),
&
MSVCRT_handles
[
1
],
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
);
MSVCRT_flags
[
1
]
=
MSVCRT__iob
[
1
].
_flag
=
MSVCRT__IOWRT
;
MSVCRT_handles
[
2
]
=
GetStdHandle
(
STD_ERROR_HANDLE
);
DuplicateHandle
(
GetCurrentProcess
(),
GetStdHandle
(
STD_ERROR_HANDLE
),
GetCurrentProcess
(),
&
MSVCRT_handles
[
2
],
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
);
MSVCRT_flags
[
2
]
=
MSVCRT__iob
[
2
].
_flag
=
MSVCRT__IOWRT
;
TRACE
(
":handles (%p)(%p)(%p)
\n
"
,
MSVCRT_handles
[
0
],
...
...
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