DosDisConnectNmPipe
Bindings: C, MASM
This call forces a named pipe to close.
DosDisConnectNmPipe (Handle)
Handle (HPIPE) - input
Handle of the named pipe that is returned by DosMakeNmPipe.
rc (USHORT) - return
Return code descriptions are:
0 NO_ERROR
109 ERROR_BROKEN_PIPE
230 ERROR_BAD_PIPE
Remarks
The server process of a named pipe issues DosDisConnectNmPipe followed by
DosConnectNmPipe to prepare the pipe for the next client.
If the client end of the pipe is open when DosDisConnectNmPipe is issued,
it is forced to close, and the client gets an error code on its next
operation. Forcing the client end to close may cause data to be discarded
that has not yet been read by the client. If the client end is currently
closing (DosClose has been issued), DosDisConnectNmPipe acknowledges the
close and makes the pipe available to be opened by the next client after
a DosConnectNmPipe is issued.
A client that gets forced off a pipe by a DosDisConnectNmPipe must issue
DosClose to free the handle resource. Although DosDisConnectNmPipe makes
the client's handle invalid, it does not free the client's handle.
Any threads that are blocked on the pipe are awakened by
DosDisConnectNmPipe. A thread blocked on the pipe by a DosWrite returns
ERROR_BROKEN_PIPE. A thread blocked on the pipe by a DosRead returns
BytesRead = 0, indicating EOF.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs