hpipe (HPIPE) - input

      The named-pipe handle to reset.

      The server handle is returned by DosCreateNPipe; the client handle is returned by DosOpen.

    state (ULONG) - input

      The named-pipe handle state.

      This parameter consists of the following bit fields:

      Bit

        Description
      31-16
        Reserved.
      15
        Blocking mode. The blocking mode is defined as either "blocking" or "nonblocking," as follows:

      • NP_WAIT (0x0000) Blocking mode: DosRead and DosWrite wait if no data is available.

      • NP_NOWAIT (0x8000)
        Nonblocking mode: DosRead and DosWrite return immediately if no data is available.

        DosRead normally blocks (waits) until at least partial data can be returned. DosWrite blocks by default until all of the requested bytes have been written. Nonblocking mode changes this behavior as follows:

        DosRead returns immediately with a value of zero for pcbActual if no data is available.

        DosWrite returns a value of zero for pcbActual if there is not enough buffer space available in the pipe; otherwise, the entire data area is transferred.

      14-10
        Reserved.
      9-8
        Read Mode. The read mode is defined as follows:

        00

          NP_READMODE_BYTE (0x0000)
          Byte-read mode: Read the pipe as a byte stream.
        01
          NP_READMODE_MESSAGE (0x0100)
          Message-stream mode: Read the pipe as a message stream.
        7-0
          Reserved, must be set to 0.

        ulrc (APIRET) - returns

          Return Code.

          DosSetNPHState returns one of the following values:

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


        [Back] [Next]