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
07b681e0
Commit
07b681e0
authored
Sep 29, 2011
by
Bernhard Loos
Committed by
Alexandre Julliard
Oct 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement the NamedPipeConfiguration value for the…
ntdll: Implement the NamedPipeConfiguration value for the FilePipeLocalInformation class of NtQueryInformationFile.
parent
9034e694
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
8 deletions
+28
-8
file.c
dlls/ntdll/file.c
+12
-1
pipe.c
dlls/ntdll/tests/pipe.c
+6
-1
server_protocol.h
include/wine/server_protocol.h
+2
-2
named_pipe.c
server/named_pipe.c
+1
-0
protocol.def
server/protocol.def
+1
-0
request.h
server/request.h
+5
-4
trace.c
server/trace.c
+1
-0
No files found.
dlls/ntdll/file.c
View file @
07b681e0
...
...
@@ -1960,7 +1960,18 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
{
pli
->
NamedPipeType
=
(
reply
->
flags
&
NAMED_PIPE_MESSAGE_STREAM_WRITE
)
?
FILE_PIPE_TYPE_MESSAGE
:
FILE_PIPE_TYPE_BYTE
;
pli
->
NamedPipeConfiguration
=
0
;
/* FIXME */
switch
(
reply
->
sharing
)
{
case
FILE_SHARE_READ
:
pli
->
NamedPipeConfiguration
=
FILE_PIPE_OUTBOUND
;
break
;
case
FILE_SHARE_WRITE
:
pli
->
NamedPipeConfiguration
=
FILE_PIPE_INBOUND
;
break
;
case
FILE_SHARE_READ
|
FILE_SHARE_WRITE
:
pli
->
NamedPipeConfiguration
=
FILE_PIPE_FULL_DUPLEX
;
break
;
}
pli
->
MaximumInstances
=
reply
->
maxinstances
;
pli
->
CurrentInstances
=
reply
->
instances
;
pli
->
InboundQuota
=
reply
->
insize
;
...
...
dlls/ntdll/tests/pipe.c
View file @
07b681e0
...
...
@@ -181,7 +181,8 @@ static void test_create(void)
IO_STATUS_BLOCK
iosb
;
static
const
DWORD
access
[]
=
{
0
,
GENERIC_READ
,
GENERIC_WRITE
,
GENERIC_READ
|
GENERIC_WRITE
};
static
const
DWORD
sharing
[]
=
{
FILE_SHARE_READ
,
FILE_SHARE_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
};
static
const
DWORD
sharing
[]
=
{
FILE_SHARE_READ
,
FILE_SHARE_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
};
static
const
DWORD
pipe_config
[]
=
{
1
,
0
,
2
};
for
(
j
=
0
;
j
<
sizeof
(
sharing
)
/
sizeof
(
DWORD
);
j
++
)
{
for
(
k
=
0
;
k
<
sizeof
(
access
)
/
sizeof
(
DWORD
);
k
++
)
{
...
...
@@ -196,12 +197,16 @@ static void test_create(void)
res
=
pNtQueryInformationFile
(
hserver
,
&
iosb
,
&
info
,
sizeof
(
info
),
(
FILE_INFORMATION_CLASS
)
24
);
ok
(
!
res
,
"NtQueryInformationFile for server returned %x, sharing: %x
\n
"
,
res
,
sharing
[
j
]);
ok
(
info
.
NamedPipeConfiguration
==
pipe_config
[
j
],
"wrong duplex status for pipe: %d, expected %d
\n
"
,
info
.
NamedPipeConfiguration
,
pipe_config
[
j
]);
hclient
=
CreateFileW
(
testpipe
,
access
[
k
],
0
,
0
,
OPEN_EXISTING
,
0
,
0
);
if
(
hclient
!=
INVALID_HANDLE_VALUE
)
{
res
=
pNtQueryInformationFile
(
hclient
,
&
iosb
,
&
info
,
sizeof
(
info
),
(
FILE_INFORMATION_CLASS
)
24
);
ok
(
!
res
,
"NtQueryInformationFile for client returned %x, access: %x, sharing: %x
\n
"
,
res
,
access
[
k
],
sharing
[
j
]);
ok
(
info
.
NamedPipeConfiguration
==
pipe_config
[
j
],
"wrong duplex status for pipe: %d, expected %d
\n
"
,
info
.
NamedPipeConfiguration
,
pipe_config
[
j
]);
CloseHandle
(
hclient
);
}
...
...
include/wine/server_protocol.h
View file @
07b681e0
...
...
@@ -3063,11 +3063,11 @@ struct get_named_pipe_info_reply
{
struct
reply_header
__header
;
unsigned
int
flags
;
unsigned
int
sharing
;
unsigned
int
maxinstances
;
unsigned
int
instances
;
unsigned
int
outsize
;
unsigned
int
insize
;
char
__pad_28
[
4
];
};
...
...
@@ -5637,6 +5637,6 @@ union generic_reply
struct
set_suspend_context_reply
set_suspend_context_reply
;
};
#define SERVER_PROTOCOL_VERSION 42
6
#define SERVER_PROTOCOL_VERSION 42
7
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/named_pipe.c
View file @
07b681e0
...
...
@@ -1026,6 +1026,7 @@ DECL_HANDLER(get_named_pipe_info)
}
reply
->
flags
=
server
->
pipe
->
flags
;
reply
->
sharing
=
server
->
pipe
->
sharing
;
reply
->
maxinstances
=
server
->
pipe
->
maxinstances
;
reply
->
instances
=
server
->
pipe
->
instances
;
reply
->
insize
=
server
->
pipe
->
insize
;
...
...
server/protocol.def
View file @
07b681e0
...
...
@@ -2208,6 +2208,7 @@ enum message_type
obj_handle_t handle;
@REPLY
unsigned int flags;
unsigned int sharing;
unsigned int maxinstances;
unsigned int instances;
unsigned int outsize;
...
...
server/request.h
View file @
07b681e0
...
...
@@ -1489,10 +1489,11 @@ C_ASSERT( sizeof(struct create_named_pipe_reply) == 16 );
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_named_pipe_info_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
flags
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
maxinstances
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
instances
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
outsize
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
insize
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
sharing
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
maxinstances
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
instances
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
outsize
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_named_pipe_info_reply
,
insize
)
==
28
);
C_ASSERT
(
sizeof
(
struct
get_named_pipe_info_reply
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_window_request
,
parent
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_window_request
,
owner
)
==
16
);
...
...
server/trace.c
View file @
07b681e0
...
...
@@ -2629,6 +2629,7 @@ static void dump_get_named_pipe_info_request( const struct get_named_pipe_info_r
static
void
dump_get_named_pipe_info_reply
(
const
struct
get_named_pipe_info_reply
*
req
)
{
fprintf
(
stderr
,
" flags=%08x"
,
req
->
flags
);
fprintf
(
stderr
,
", sharing=%08x"
,
req
->
sharing
);
fprintf
(
stderr
,
", maxinstances=%08x"
,
req
->
maxinstances
);
fprintf
(
stderr
,
", instances=%08x"
,
req
->
instances
);
fprintf
(
stderr
,
", outsize=%08x"
,
req
->
outsize
);
...
...
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