dos12.hlp (Table of Contents; Topic list)
DosTransactNmPipe (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSNMPIPES
 
USHORT DosTransactNmPipe(hp, pbOutBuf, cbOutBuf, pbInBuf, cbInBuf,
    pcbRead)
HPIPE hp;           /* pipe handle                                  */
PBYTE pbOutBuf;     /* pointer to buffer with data                  */
USHORT cbOutBuf;    /* number of bytes in output buffer             */
PBYTE pbInBuf;      /* pointer to buffer for data                   */
USHORT cbInBuf;     /* number of bytes in input buffer              */
PUSHORT pcbRead;    /* pointer to variable for number of bytes read */
 
The DosTransactNmPipe function writes data to and reads data from a named
pipe.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hp         Identifies the named pipe.
 
pbOutBuf   Points to the buffer that contains the data written to the pipe.
 
cbOutBuf   Specifies the size (in bytes) of the output buffer.
 
pbInBuf    Points to the input buffer that receives the data read from the
           pipe.
 
cbInBuf    Specifies the size (in bytes) of the input buffer.
 
pcbRead    Points to the variable that receives the number of bytes read
           from the pipe.
 
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_INTERRUPT
     ERROR_INVALID_FUNCTION
     ERROR_MORE_DATA
     ERROR_SEM_TIMEOUT
 
Comments
 
The DosTransactNmPipe function fails if the named pipe contains any unread
data or if the named pipe is not in message mode. A named pipe's blocking
state has no effect on the DosTransactNmPipe function. The
DosTransactNmPipe function does not return until data is written to the
output buffer.
 
See Also
 
DosCallNmPipe, DosRead