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
be2443e0
Commit
be2443e0
authored
Jun 25, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Reimplement OpenConsoleW on top of CreateFileW.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0556d9e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
25 deletions
+7
-25
console.c
dlls/kernel32/console.c
+7
-25
No files found.
dlls/kernel32/console.c
View file @
be2443e0
...
@@ -227,39 +227,21 @@ BOOL WINAPI Beep( DWORD dwFreq, DWORD dwDur )
...
@@ -227,39 +227,21 @@ BOOL WINAPI Beep( DWORD dwFreq, DWORD dwDur )
*/
*/
HANDLE
WINAPI
OpenConsoleW
(
LPCWSTR
name
,
DWORD
access
,
BOOL
inherit
,
DWORD
creation
)
HANDLE
WINAPI
OpenConsoleW
(
LPCWSTR
name
,
DWORD
access
,
BOOL
inherit
,
DWORD
creation
)
{
{
HANDLE
output
=
INVALID_HANDLE_VALUE
;
SECURITY_ATTRIBUTES
sa
;
HANDLE
ret
;
TRACE
(
"(%s, 0x%08x, %d, %u)
\n
"
,
debugstr_w
(
name
),
access
,
inherit
,
creation
);
TRACE
(
"(%s, 0x%08x, %d, %u)
\n
"
,
debugstr_w
(
name
),
access
,
inherit
,
creation
);
if
(
name
)
if
(
!
name
||
(
strcmpiW
(
coninW
,
name
)
&&
strcmpiW
(
conoutW
,
name
))
||
creation
!=
OPEN_EXISTING
)
{
if
(
strcmpiW
(
coninW
,
name
)
==
0
)
output
=
(
HANDLE
)
FALSE
;
else
if
(
strcmpiW
(
conoutW
,
name
)
==
0
)
output
=
(
HANDLE
)
TRUE
;
}
if
(
output
==
INVALID_HANDLE_VALUE
||
creation
!=
OPEN_EXISTING
)
{
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
INVALID_HANDLE_VALUE
;
return
INVALID_HANDLE_VALUE
;
}
}
SERVER_START_REQ
(
open_console
)
sa
.
nLength
=
sizeof
(
sa
);
{
sa
.
lpSecurityDescriptor
=
NULL
;
req
->
from
=
wine_server_obj_handle
(
output
);
sa
.
bInheritHandle
=
inherit
;
req
->
access
=
access
;
req
->
attributes
=
inherit
?
OBJ_INHERIT
:
0
;
req
->
share
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
wine_server_call_err
(
req
);
ret
=
wine_server_ptr_handle
(
reply
->
handle
);
}
SERVER_END_REQ
;
if
(
ret
)
ret
=
console_handle_map
(
ret
);
return
ret
;
return
CreateFileW
(
name
,
access
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
&
sa
,
creation
,
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