hpipe (HPIPE) - input

      The named-pipe handle to examine.

      DosCreateNPipe returns the server handle; DosOpen returns the client handle.

    pBuf (PVOID) - output

      A pointer to the output buffer.

    cbBuf (ULONG) - input

      The number of bytes to be read.

    pcbActual (PULONG) - output

      A pointer a ULONG in which the number of bytes that were read is returned.

    pAvail (PAVAILDATA) - output

      A pointer to the AVAILDATA in which the number of bytes that were available is returned.

    pState (PULONG) - output

      A pointer to the ULONG in which the state of the named pipe is returned.

      Possible values are shown in the following list:

    • NP_STATE_DISCONNECTED

      The pipe is in a disconnected state immediately after a call to DosCreateNPipe, or DosDisConnectNPipe. A disconnected pipe cannot accept a call to DosOpen. The server must issue DosDisConnectNPipe before the pipe can be opened by a client.

    • NP_STATE_LISTENING

      The pipe is in a listening state after the server issues DosConnectNPipe. A listening pipe is ready to accept a DosOpen request. If the pipe is not in a listening state, DosOpen returns ERROR_PIPE_BUSY.

    • NP_STATE_CONNECTED

      The pipe is in a connected state after a client has successfully issued DosOpen. The connected pipe allows the server and the client to read and write to the pipe, provided both have valid handles.

    • NP_STATE_CLOSING

      The pipe is in a closing state after the last DosClose request has been made to the pipe by either the client or the server. When DosClose has been issued for the client handle and all of its duplicates, the client end of the pipe is closed. The serving end must acknowledge the closing of the client end by issuing either DosDisConnectNPipe or DosClose. Issuing DosClose reallocates the pipe.

    ulrc (APIRET) - returns

      Return Code.

      DosPeekNPipe returns one of the following values:

    • NO_ERROR 5
        ERROR_ACCESS_DENIED
      230
        ERROR_BAD_PIPE
      231
        ERROR_PIPE_BUSY
      233
        ERROR_PIPE_NOT_CONNECTED
      For a full list of error codes, see Errors.


    [Back] [Next]