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.
DosQNmPHandState (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSNMPIPES
 
USHORT DosQNmPHandState(hp, pfsState)
HPIPE hp;            /* pipe handle                                */
PUSHORT pfsState;    /* pointer to variable receiving handle state */
 
The DosQNmPHandState function retrieves information about the state of a
specified pipe handle.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hp         Identifies the pipe to read from.
 
pfsState   Points to the variable that receives the handle state. This
           parameter is a combination of an instance count, a read-mode
           flag, a type flag, an end-point flag, and a wait flag. The
           possible values are:
 
           Value                   Meaning
           ─────────────────────────────────────────────────────────────────
           NP_END_CLIENT           The handle is the client end of a named
                                   pipe.
 
           NP_END_SERVER           The handle is the server end of a named
                                   pipe.
 
           NP_NOWAIT               Reading from the pipe returns immediately
                                   if no data is available. If this flag is
                                   not set, reading from the pipe waits
                                   until data is available.
 
           NP_READMODE_MESSAGE     Read the pipe as a message stream. If
                                   this flag is not set, the pipe is read as
                                   a byte stream.
 
           NP_TYPE_MESSAGE         The pipe is a message-stream pipe. If
                                   this flag is not set, the pipe is a
                                   byte-stream pipe.
 
           NP_UNLIMITED_INSTANCES  Unlimited instances of the pipe can be
                                   created. If this flag is not specified, a
                                   value from 1 through 254 can be used for
                                   the number of instances.
 
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_PIPE_NOT_CONNECTED
 
Comments
 
If the handle is the server end of the pipe, the handle-state values are
identical to those set by the call to the DosMakeNmPipe function that
created the pipe. If the handle is the client end of the pipe, the
handle-state values are determined by the DosOpen function that opened the
pipe or are set by the DosSetNmPHandState function.
 
See Also
 
DosMakeNmPipe, DosOpen, DosSetNmPHandState