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
9e66e97d
Commit
9e66e97d
authored
Aug 11, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Aug 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement GetNamedPipeHandleState.
Based on a patch by Adam Martinson.
parent
b765561b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
11 deletions
+52
-11
sync.c
dlls/kernel32/sync.c
+52
-7
pipe.c
dlls/kernel32/tests/pipe.c
+0
-4
No files found.
dlls/kernel32/sync.c
View file @
9e66e97d
...
...
@@ -1712,12 +1712,16 @@ BOOL WINAPI GetNamedPipeHandleStateA(
LPDWORD
lpMaxCollectionCount
,
LPDWORD
lpCollectDataTimeout
,
LPSTR
lpUsername
,
DWORD
nUsernameMaxSize
)
{
FIXME
(
"%p %p %p %p %p %p %d
\n
"
,
hNamedPipe
,
lpState
,
lpCurInstances
,
lpMaxCollectionCount
,
lpCollectDataTimeout
,
lpUsername
,
nUsernameMaxSize
);
WARN
(
"%p %p %p %p %p %p %d: semi-stub
\n
"
,
hNamedPipe
,
lpState
,
lpCurInstances
,
lpMaxCollectionCount
,
lpCollectDataTimeout
,
lpUsername
,
nUsernameMaxSize
);
return
FALSE
;
if
(
lpUsername
&&
nUsernameMaxSize
)
*
lpUsername
=
0
;
return
GetNamedPipeHandleStateW
(
hNamedPipe
,
lpState
,
lpCurInstances
,
lpMaxCollectionCount
,
lpCollectDataTimeout
,
NULL
,
0
);
}
/***********************************************************************
...
...
@@ -1728,12 +1732,53 @@ BOOL WINAPI GetNamedPipeHandleStateW(
LPDWORD
lpMaxCollectionCount
,
LPDWORD
lpCollectDataTimeout
,
LPWSTR
lpUsername
,
DWORD
nUsernameMaxSize
)
{
FIXME
(
"%p %p %p %p %p %p %d
\n
"
,
IO_STATUS_BLOCK
iosb
;
NTSTATUS
status
;
FIXME
(
"%p %p %p %p %p %p %d: semi-stub
\n
"
,
hNamedPipe
,
lpState
,
lpCurInstances
,
lpMaxCollectionCount
,
lpCollectDataTimeout
,
lpUsername
,
nUsernameMaxSize
);
return
FALSE
;
if
(
lpMaxCollectionCount
)
*
lpMaxCollectionCount
=
0
;
if
(
lpCollectDataTimeout
)
*
lpCollectDataTimeout
=
0
;
if
(
lpUsername
&&
nUsernameMaxSize
)
*
lpUsername
=
0
;
if
(
lpState
)
{
FILE_PIPE_INFORMATION
fpi
;
status
=
NtQueryInformationFile
(
hNamedPipe
,
&
iosb
,
&
fpi
,
sizeof
(
fpi
),
FilePipeInformation
);
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
*
lpState
=
(
fpi
.
ReadMode
?
PIPE_READMODE_MESSAGE
:
PIPE_READMODE_BYTE
)
|
(
fpi
.
CompletionMode
?
PIPE_NOWAIT
:
PIPE_WAIT
);
}
if
(
lpCurInstances
)
{
FILE_PIPE_LOCAL_INFORMATION
fpli
;
status
=
NtQueryInformationFile
(
hNamedPipe
,
&
iosb
,
&
fpli
,
sizeof
(
fpli
),
FilePipeLocalInformation
);
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
*
lpCurInstances
=
fpli
.
CurrentInstances
;
}
return
TRUE
;
}
/***********************************************************************
...
...
dlls/kernel32/tests/pipe.c
View file @
9e66e97d
...
...
@@ -1662,11 +1662,9 @@ static void test_NamedPipeHandleState(void)
/* lpSecurityAttrib */
NULL
);
ok
(
server
!=
INVALID_HANDLE_VALUE
,
"cf failed
\n
"
);
ret
=
GetNamedPipeHandleStateA
(
server
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
ret
,
"GetNamedPipeHandleState failed: %d
\n
"
,
GetLastError
());
ret
=
GetNamedPipeHandleStateA
(
server
,
&
state
,
&
instances
,
NULL
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
ret
,
"GetNamedPipeHandleState failed: %d
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -1719,11 +1717,9 @@ static void test_NamedPipeHandleState(void)
/* lpSecurityAttrib */
NULL
);
ok
(
server
!=
INVALID_HANDLE_VALUE
,
"cf failed
\n
"
);
ret
=
GetNamedPipeHandleStateA
(
server
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
ret
,
"GetNamedPipeHandleState failed: %d
\n
"
,
GetLastError
());
ret
=
GetNamedPipeHandleStateA
(
server
,
&
state
,
&
instances
,
NULL
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
ret
,
"GetNamedPipeHandleState failed: %d
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
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