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
530d50c8
Commit
530d50c8
authored
Jul 31, 2002
by
Rafael Kitover
Committed by
Alexandre Julliard
Jul 31, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed dos_handles to store dups of stdio/out/err as per Ove Kaaven's
suggestion.
parent
2a0dd0be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
file.c
files/file.c
+11
-17
No files found.
files/file.c
View file @
530d50c8
...
...
@@ -1232,11 +1232,17 @@ HFILE WINAPI OpenFile( LPCSTR name, OFSTRUCT *ofs, UINT mode )
*/
static
void
FILE_InitProcessDosHandles
(
void
)
{
dos_handles
[
0
]
=
GetStdHandle
(
STD_INPUT_HANDLE
);
dos_handles
[
1
]
=
GetStdHandle
(
STD_OUTPUT_HANDLE
);
dos_handles
[
2
]
=
GetStdHandle
(
STD_ERROR_HANDLE
);
dos_handles
[
3
]
=
GetStdHandle
(
STD_ERROR_HANDLE
);
dos_handles
[
4
]
=
GetStdHandle
(
STD_ERROR_HANDLE
);
HANDLE
cp
=
GetCurrentProcess
();
DuplicateHandle
(
cp
,
GetStdHandle
(
STD_INPUT_HANDLE
),
cp
,
&
dos_handles
[
0
],
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
DuplicateHandle
(
cp
,
GetStdHandle
(
STD_OUTPUT_HANDLE
),
cp
,
&
dos_handles
[
1
],
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
DuplicateHandle
(
cp
,
GetStdHandle
(
STD_ERROR_HANDLE
),
cp
,
&
dos_handles
[
2
],
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
DuplicateHandle
(
cp
,
GetStdHandle
(
STD_ERROR_HANDLE
),
cp
,
&
dos_handles
[
3
],
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
DuplicateHandle
(
cp
,
GetStdHandle
(
STD_ERROR_HANDLE
),
cp
,
&
dos_handles
[
4
],
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
}
/***********************************************************************
...
...
@@ -1331,12 +1337,6 @@ HFILE16 FILE_Dup2( HFILE16 hFile1, HFILE16 hFile2 )
SetLastError
(
ERROR_INVALID_HANDLE
);
return
HFILE_ERROR16
;
}
if
(
hFile2
<
5
)
{
FIXME
(
"stdio handle closed, need proper conversion
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
HFILE_ERROR16
;
}
if
(
!
DuplicateHandle
(
GetCurrentProcess
(),
dos_handles
[
hFile1
],
GetCurrentProcess
(),
&
new_handle
,
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
))
...
...
@@ -1352,12 +1352,6 @@ HFILE16 FILE_Dup2( HFILE16 hFile1, HFILE16 hFile2 )
*/
HFILE16
WINAPI
_lclose16
(
HFILE16
hFile
)
{
if
(
hFile
<
5
)
{
FIXME
(
"stdio handle closed, need proper conversion
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
HFILE_ERROR16
;
}
if
((
hFile
>=
DOS_TABLE_SIZE
)
||
!
dos_handles
[
hFile
])
{
SetLastError
(
ERROR_INVALID_HANDLE
);
...
...
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