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.


        [Back] [Next]