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
aab12f5f
Commit
aab12f5f
authored
Aug 18, 2005
by
Ivan Leo Puoti
Committed by
Alexandre Julliard
Aug 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement FSCTL_PIPE_DISCONNECT in NtFsControlFile and make
DisconnectNamedPipe call it.
parent
7f6554b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
23 deletions
+41
-23
sync.c
dlls/kernel/sync.c
+17
-10
file.c
dlls/ntdll/file.c
+24
-13
No files found.
dlls/kernel/sync.c
View file @
aab12f5f
...
...
@@ -50,6 +50,7 @@
#include "winerror.h"
#include "winnls.h"
#include "winternl.h"
#include "winioctl.h"
#include "wine/server.h"
#include "wine/unicode.h"
...
...
@@ -1357,22 +1358,28 @@ BOOL WINAPI ConnectNamedPipe(HANDLE hPipe, LPOVERLAPPED overlapped)
/***********************************************************************
* DisconnectNamedPipe (KERNEL32.@)
*
* Disconnects from a named pipe
*
* Parameters
* hPipe: A handle to a named pipe returned by CreateNamedPipe
*
* Return values
* TRUE: Success
* FALSE: Failure, GetLastError can be called for further details
*/
BOOL
WINAPI
DisconnectNamedPipe
(
HANDLE
hPipe
)
{
BOOL
ret
;
NTSTATUS
status
;
IO_STATUS_BLOCK
io_block
;
TRACE
(
"(%p)
\n
"
,
hPipe
);
SERVER_START_REQ
(
disconnect_named_pipe
)
{
req
->
handle
=
hPipe
;
ret
=
!
wine_server_call_err
(
req
);
if
(
ret
&&
reply
->
fd
!=
-
1
)
close
(
reply
->
fd
);
}
SERVER_END_REQ
;
return
ret
;
status
=
NtFsControlFile
(
hPipe
,
0
,
NULL
,
NULL
,
&
io_block
,
FSCTL_PIPE_DISCONNECT
,
NULL
,
0
,
NULL
,
0
);
if
(
status
==
STATUS_SUCCESS
)
return
TRUE
;
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
FALSE
;
}
/***********************************************************************
...
...
dlls/ntdll/file.c
View file @
aab12f5f
...
...
@@ -866,22 +866,33 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE DeviceHandle, HANDLE hEvent,
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
*/
NTSTATUS
WINAPI
NtFsControlFile
(
IN
HANDLE
DeviceHandle
,
IN
HANDLE
Event
OPTIONAL
,
IN
PIO_APC_ROUTINE
ApcRoutine
OPTIONAL
,
IN
PVOID
ApcContext
OPTIONAL
,
OUT
PIO_STATUS_BLOCK
IoStatusBlock
,
IN
ULONG
IoControlCode
,
IN
PVOID
InputBuffer
,
IN
ULONG
InputBufferSize
,
OUT
PVOID
OutputBuffer
,
IN
ULONG
OutputBufferSize
)
NTSTATUS
WINAPI
NtFsControlFile
(
HANDLE
DeviceHandle
,
HANDLE
Event
OPTIONAL
,
PIO_APC_ROUTINE
ApcRoutine
,
PVOID
ApcContext
,
PIO_STATUS_BLOCK
IoStatusBlock
,
ULONG
IoControlCode
,
PVOID
InputBuffer
,
ULONG
InputBufferSize
,
PVOID
OutputBuffer
,
ULONG
OutputBufferSize
)
{
FIXME
(
"(%p,%p,%p,%p,%p,0x%08lx,%p,0x%08lx,%p,0x%08lx): stub
\n
"
,
NTSTATUS
ret
;
TRACE
(
"(%p,%p,%p,%p,%p,0x%08lx,%p,0x%08lx,%p,0x%08lx)
\n
"
,
DeviceHandle
,
Event
,
ApcRoutine
,
ApcContext
,
IoStatusBlock
,
IoControlCode
,
InputBuffer
,
InputBufferSize
,
OutputBuffer
,
OutputBufferSize
);
return
0
;
if
(
!
IoStatusBlock
)
return
STATUS_INVALID_PARAMETER
;
switch
(
IoControlCode
)
{
case
FSCTL_PIPE_DISCONNECT
:
SERVER_START_REQ
(
disconnect_named_pipe
)
{
req
->
handle
=
DeviceHandle
;
ret
=
wine_server_call
(
req
);
if
(
!
ret
&&
reply
->
fd
!=
-
1
)
close
(
reply
->
fd
);
}
SERVER_END_REQ
;
return
ret
;
default
:
FIXME
(
"Unsupported IoControlCode %lx
\n
"
,
IoControlCode
);
return
STATUS_NOT_SUPPORTED
;
}
}
/******************************************************************************
...
...
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