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
99027aea
Commit
99027aea
authored
Apr 16, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move GetNamedPipeHandleStateW() implementation to kernelbase.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f8fb43aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
63 deletions
+41
-63
kernel32.spec
dlls/kernel32/kernel32.spec
+2
-2
sync.c
dlls/kernel32/sync.c
+0
-60
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+1
-1
sync.c
dlls/kernelbase/sync.c
+38
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
99027aea
...
...
@@ -731,8 +731,8 @@
# @ stub GetNamedPipeClientComputerNameW
@ stdcall GetNamedPipeClientProcessId(long ptr)
@ stdcall GetNamedPipeClientSessionId(long ptr)
@ stdcall GetNamedPipeHandleStateA(long ptr ptr ptr ptr
s
tr long)
@ stdcall
GetNamedPipeHandleStateW(long ptr ptr ptr ptr ws
tr long)
@ stdcall GetNamedPipeHandleStateA(long ptr ptr ptr ptr
p
tr long)
@ stdcall
-import GetNamedPipeHandleStateW(long ptr ptr ptr ptr p
tr long)
@ stdcall -import GetNamedPipeInfo(long ptr ptr ptr ptr)
@ stdcall GetNamedPipeServerProcessId(long ptr)
@ stdcall GetNamedPipeServerSessionId(long ptr)
...
...
dlls/kernel32/sync.c
View file @
99027aea
...
...
@@ -42,7 +42,6 @@
#include "ddk/wdm.h"
#include "wine/asm.h"
#include "wine/library.h"
#include "wine/unicode.h"
#include "kernel_private.h"
...
...
@@ -631,65 +630,6 @@ BOOL WINAPI GetNamedPipeHandleStateA(
}
/***********************************************************************
* GetNamedPipeHandleStateW (KERNEL32.@)
*/
BOOL
WINAPI
GetNamedPipeHandleStateW
(
HANDLE
hNamedPipe
,
LPDWORD
lpState
,
LPDWORD
lpCurInstances
,
LPDWORD
lpMaxCollectionCount
,
LPDWORD
lpCollectDataTimeout
,
LPWSTR
lpUsername
,
DWORD
nUsernameMaxSize
)
{
IO_STATUS_BLOCK
iosb
;
NTSTATUS
status
;
FIXME
(
"%p %p %p %p %p %p %d: semi-stub
\n
"
,
hNamedPipe
,
lpState
,
lpCurInstances
,
lpMaxCollectionCount
,
lpCollectDataTimeout
,
lpUsername
,
nUsernameMaxSize
);
if
(
lpMaxCollectionCount
)
*
lpMaxCollectionCount
=
0
;
if
(
lpCollectDataTimeout
)
*
lpCollectDataTimeout
=
0
;
if
(
lpUsername
&&
nUsernameMaxSize
)
{
const
char
*
username
=
wine_get_user_name
();
int
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
username
,
-
1
,
lpUsername
,
nUsernameMaxSize
);
if
(
!
len
)
*
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
;
}
/***********************************************************************
* CallNamedPipeA (KERNEL32.@)
*/
BOOL
WINAPI
CallNamedPipeA
(
...
...
dlls/kernelbase/kernelbase.spec
View file @
99027aea
...
...
@@ -570,7 +570,7 @@
@ stub GetNamedLocaleHashNode
@ stub GetNamedPipeAttribute
@ stub GetNamedPipeClientComputerNameW
@ stdcall GetNamedPipeHandleStateW(long ptr ptr ptr ptr
wstr long) kernel32.GetNamedPipeHandleStateW
@ stdcall GetNamedPipeHandleStateW(long ptr ptr ptr ptr
ptr long)
@ stdcall GetNamedPipeInfo(long ptr ptr ptr ptr)
@ stdcall GetNativeSystemInfo(ptr)
# @ stub GetNextFgPolicyRefreshInfoInternal
...
...
dlls/kernelbase/sync.c
View file @
99027aea
...
...
@@ -1202,6 +1202,44 @@ BOOL WINAPI DECLSPEC_HOTPATCH DisconnectNamedPipe( HANDLE pipe )
/***********************************************************************
* GetNamedPipeHandleStateW (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
GetNamedPipeHandleStateW
(
HANDLE
pipe
,
DWORD
*
state
,
DWORD
*
instances
,
DWORD
*
max_count
,
DWORD
*
timeout
,
WCHAR
*
user
,
DWORD
size
)
{
IO_STATUS_BLOCK
io
;
FIXME
(
"%p %p %p %p %p %p %d: semi-stub
\n
"
,
pipe
,
state
,
instances
,
max_count
,
timeout
,
user
,
size
);
if
(
max_count
)
*
max_count
=
0
;
if
(
timeout
)
*
timeout
=
0
;
if
(
user
&&
size
&&
!
GetEnvironmentVariableW
(
L"WINEUSERNAME"
,
user
,
size
))
user
[
0
]
=
0
;
if
(
state
)
{
FILE_PIPE_INFORMATION
info
;
if
(
!
set_ntstatus
(
NtQueryInformationFile
(
pipe
,
&
io
,
&
info
,
sizeof
(
info
),
FilePipeInformation
)))
return
FALSE
;
*
state
=
(
info
.
ReadMode
?
PIPE_READMODE_MESSAGE
:
PIPE_READMODE_BYTE
)
|
(
info
.
CompletionMode
?
PIPE_NOWAIT
:
PIPE_WAIT
);
}
if
(
instances
)
{
FILE_PIPE_LOCAL_INFORMATION
info
;
if
(
!
set_ntstatus
(
NtQueryInformationFile
(
pipe
,
&
io
,
&
info
,
sizeof
(
info
),
FilePipeLocalInformation
)))
return
FALSE
;
*
instances
=
info
.
CurrentInstances
;
}
return
TRUE
;
}
/***********************************************************************
* GetNamedPipeInfo (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
GetNamedPipeInfo
(
HANDLE
pipe
,
LPDWORD
flags
,
LPDWORD
out_size
,
...
...
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