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
7a096601
Commit
7a096601
authored
Dec 09, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use attributes instead of inherit flag in console requests.
parent
27b1aec9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
36 deletions
+36
-36
console.c
dlls/kernel/console.c
+8
-8
server_protocol.h
include/wine/server_protocol.h
+6
-6
wineconsole.c
programs/wineconsole/wineconsole.c
+9
-9
console.c
server/console.c
+3
-3
protocol.def
server/protocol.def
+5
-5
trace.c
server/trace.c
+5
-5
No files found.
dlls/kernel/console.c
View file @
7a096601
...
...
@@ -230,10 +230,10 @@ HANDLE WINAPI OpenConsoleW(LPCWSTR name, DWORD access, BOOL inherit, DWORD creat
SERVER_START_REQ
(
open_console
)
{
req
->
from
=
output
;
req
->
access
=
access
;
req
->
share
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
req
->
inherit
=
inherit
;
req
->
from
=
output
;
req
->
access
=
access
;
req
->
attributes
=
inherit
?
OBJ_INHERIT
:
0
;
req
->
share
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
SetLastError
(
0
);
wine_server_call_err
(
req
);
ret
=
reply
->
handle
;
...
...
@@ -1665,10 +1665,10 @@ HANDLE WINAPI CreateConsoleScreenBuffer(DWORD dwDesiredAccess, DWORD dwShareMode
SERVER_START_REQ
(
create_console_output
)
{
req
->
handle_in
=
0
;
req
->
access
=
dwDesiredAccess
;
req
->
share
=
dwShareMode
;
req
->
inherit
=
(
sa
&&
sa
->
bInheritHandle
)
;
req
->
handle_in
=
0
;
req
->
access
=
dwDesiredAccess
;
req
->
attributes
=
(
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
;
req
->
share
=
dwShareMode
;
if
(
!
wine_server_call_err
(
req
))
ret
=
reply
->
handle_out
;
}
SERVER_END_REQ
;
...
...
include/wine/server_protocol.h
View file @
7a096601
...
...
@@ -977,7 +977,7 @@ struct alloc_console_request
{
struct
request_header
__header
;
unsigned
int
access
;
int
inherit
;
unsigned
int
attributes
;
process_id_t
pid
;
};
struct
alloc_console_reply
...
...
@@ -1063,7 +1063,7 @@ struct open_console_request
int
from
;
unsigned
int
access
;
int
inherit
;
unsigned
int
attributes
;
int
share
;
};
struct
open_console_reply
...
...
@@ -1183,9 +1183,9 @@ struct create_console_output_request
{
struct
request_header
__header
;
obj_handle_t
handle_in
;
int
access
;
int
share
;
int
inherit
;
unsigned
int
access
;
unsigned
int
attributes
;
unsigned
int
share
;
};
struct
create_console_output_reply
{
...
...
@@ -4316,6 +4316,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
};
#define SERVER_PROTOCOL_VERSION 2
09
#define SERVER_PROTOCOL_VERSION 2
10
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
programs/wineconsole/wineconsole.c
View file @
7a096601
...
...
@@ -274,10 +274,10 @@ int WINECON_GrabChanges(struct inner_data* data)
case
CONSOLE_RENDERER_ACTIVE_SB_EVENT
:
SERVER_START_REQ
(
open_console
)
{
req
->
from
=
(
int
)
data
->
hConIn
;
req
->
access
=
GENERIC_READ
|
GENERIC_WRITE
;
req
->
share
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
req
->
inherit
=
FALS
E
;
req
->
from
=
(
int
)
data
->
hConIn
;
req
->
access
=
GENERIC_READ
|
GENERIC_WRITE
;
req
->
attributes
=
0
;
req
->
share
=
FILE_SHARE_READ
|
FILE_SHARE_WRIT
E
;
h
=
wine_server_call_err
(
req
)
?
0
:
(
HANDLE
)
reply
->
handle
;
}
SERVER_END_REQ
;
...
...
@@ -608,7 +608,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
SERVER_START_REQ
(
alloc_console
)
{
req
->
access
=
GENERIC_READ
|
GENERIC_WRITE
;
req
->
inherit
=
FALSE
;
req
->
attributes
=
0
;
req
->
pid
=
pid
;
ret
=
!
wine_server_call_err
(
req
);
...
...
@@ -631,10 +631,10 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna
SERVER_START_REQ
(
create_console_output
)
{
req
->
handle_in
=
(
obj_handle_t
)
data
->
hConIn
;
req
->
access
=
GENERIC_WRITE
|
GENERIC_READ
;
req
->
share
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
req
->
inherit
=
FALS
E
;
req
->
handle_in
=
data
->
hConIn
;
req
->
access
=
GENERIC_WRITE
|
GENERIC_READ
;
req
->
attributes
=
0
;
req
->
share
=
FILE_SHARE_READ
|
FILE_SHARE_WRIT
E
;
ret
=
!
wine_server_call_err
(
req
);
data
->
hConOut
=
(
HANDLE
)
reply
->
handle_out
;
}
...
...
server/console.c
View file @
7a096601
...
...
@@ -1240,7 +1240,7 @@ DECL_HANDLER(alloc_console)
}
if
((
console
=
(
struct
console_input
*
)
create_console_input
(
current
)))
{
if
((
in
=
alloc_handle
(
renderer
,
console
,
req
->
access
,
req
->
inherit
)))
if
((
in
=
alloc_handle
(
renderer
,
console
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
)))
{
if
((
evt
=
alloc_handle
(
renderer
,
console
->
evt
,
SYNCHRONIZE
|
GENERIC_READ
|
GENERIC_WRITE
,
FALSE
)))
...
...
@@ -1312,7 +1312,7 @@ DECL_HANDLER(open_console)
/* FIXME: req->share is not used (as in screen buffer creation) */
if
(
obj
)
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
obj
,
req
->
access
,
req
->
inherit
);
reply
->
handle
=
alloc_handle
(
current
->
process
,
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
obj
);
}
else
if
(
!
get_error
())
set_error
(
STATUS_ACCESS_DENIED
);
...
...
@@ -1411,7 +1411,7 @@ DECL_HANDLER(create_console_output)
/* FIXME: should store sharing and test it when opening the CONOUT$ device
* see file.c on how this could be done */
reply
->
handle_out
=
alloc_handle
(
current
->
process
,
screen_buffer
,
req
->
access
,
req
->
inherit
);
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
screen_buffer
);
}
release_object
(
console
);
...
...
server/protocol.def
View file @
7a096601
...
...
@@ -738,7 +738,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
/* Allocate a console (only used by a console renderer) */
@REQ(alloc_console)
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag
*/
unsigned int attributes; /* object attributes
*/
process_id_t pid; /* pid of process which shall be attached to the console */
@REPLY
obj_handle_t handle_in; /* handle to console input */
...
...
@@ -808,7 +808,7 @@ struct console_renderer_event
int from; /* 0 (resp 1) input (resp output) of current process console */
/* otherwise console_in handle to get active screen buffer? */
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag
*/
unsigned int attributes; /* object attributes
*/
int share; /* share mask (only for output handles) */
@REPLY
obj_handle_t handle; /* handle to the console */
...
...
@@ -885,9 +885,9 @@ struct console_renderer_event
/* creates a new screen buffer on process' console */
@REQ(create_console_output)
obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
int
access; /* wanted access rights */
int share; /* sharing credential
s */
int inherit; /* inherit flag
*/
unsigned int
access; /* wanted access rights */
unsigned int attributes; /* object attribute
s */
unsigned int share; /* sharing credentials
*/
@REPLY
obj_handle_t handle_out; /* handle to the screen buffer */
@END
...
...
server/trace.c
View file @
7a096601
...
...
@@ -1169,7 +1169,7 @@ static void dump_set_socket_deferred_request( const struct set_socket_deferred_r
static
void
dump_alloc_console_request
(
const
struct
alloc_console_request
*
req
)
{
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
"
inherit=%d,"
,
req
->
inherit
);
fprintf
(
stderr
,
"
attributes=%08x,"
,
req
->
attributes
);
fprintf
(
stderr
,
" pid=%04x"
,
req
->
pid
);
}
...
...
@@ -1198,7 +1198,7 @@ static void dump_open_console_request( const struct open_console_request *req )
{
fprintf
(
stderr
,
" from=%d,"
,
req
->
from
);
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
"
inherit=%d,"
,
req
->
inherit
);
fprintf
(
stderr
,
"
attributes=%08x,"
,
req
->
attributes
);
fprintf
(
stderr
,
" share=%d"
,
req
->
share
);
}
...
...
@@ -1282,9 +1282,9 @@ static void dump_get_console_input_history_reply( const struct get_console_input
static
void
dump_create_console_output_request
(
const
struct
create_console_output_request
*
req
)
{
fprintf
(
stderr
,
" handle_in=%p,"
,
req
->
handle_in
);
fprintf
(
stderr
,
" access=%
d
,"
,
req
->
access
);
fprintf
(
stderr
,
"
share=%d,"
,
req
->
share
);
fprintf
(
stderr
,
"
inherit=%d"
,
req
->
inherit
);
fprintf
(
stderr
,
" access=%
08x
,"
,
req
->
access
);
fprintf
(
stderr
,
"
attributes=%08x,"
,
req
->
attributes
);
fprintf
(
stderr
,
"
share=%08x"
,
req
->
share
);
}
static
void
dump_create_console_output_reply
(
const
struct
create_console_output_reply
*
req
)
...
...
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