BOOLEAN
NpWriteDataQueue(
  IN  PDATA_QUEUE WriteQueue,
  IN  READ_MODE ReadMode,
  IN  PUCHAR WriteBuffer,
  IN  ULONG WriteLength,
  IN  NAMED_PIPE_TYPE PipeType,
  OUT PULONG WriteRemaining,
  IN  PCCB Ccb,
  IN  NAMED_PIPE_END NamedPipeEnd,
  IN  PETHREAD UserThread
  );

Routine Description:

    This procedure writes data from the write buffer into read entries in
    the write queue.  It will also dequeue entries in the queue as necessary.

Arguments:

    WriteQueue - Provides the write queue to process.

    ReadMode - Supplies the read mode of read entries in the write queue.

    WriteBuffer - Provides the buffer from which to read the data.

    WriteLength  - Provides the length, in bytes, of WriteBuffer.

    PipeType - Indicates if type of pipe (i.e., message or byte stream).

    WriteRemaining - Receives the number of bytes remaining to be transfered
        that were not completed by this call.  If the operation wrote
        everything then is value is set to zero.

    Ccb - Supplies the ccb for the operation

    NamedPipeEnd - Supplies the end of the pipe doing the write

    UserThread - Supplies the user thread

Return Value:

    BOOLEAN - TRUE if the operation wrote everything and FALSE otherwise.
        Note that a zero byte message that hasn't been written will return
        a function result of FALSE and WriteRemaining of zero.