dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosDisConnectNmPipe (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSNMPIPES
 
USHORT DosDisConnectNmPipe(hp)
HPIPE hp;    /* pipe handle */
 
The DosDisConnectNmPipe function closes a client's handle of a named pipe.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hp         Identifies the named pipe. This handle must have been created
           previously by using the DosMakeNmPipe function.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_BAD_PIPE
     ERROR_INVALID_FUNCTION
 
Comments
 
If the client end of a named pipe is open, the DosDisConnectNmPipe function
forces that end of the named pipe closed. The client will receive an error
value the next time it attempts to access the pipe. Closing the client end
of a named pipe may discard data in the pipe before the client reads the
data.
 
A client that is forced off a pipe by a call to DosDisConnectNmPipe must
still close its end of the pipe by using the DosClose function.
 
See Also
 
DosClose, DosConnectNmPipe, DosMakeNmPipe
 
                                      ♦