dos12.hlp (Table of Contents; Topic list)
DosCallNmPipe (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSNMPIPES
 
USHORT DosCallNmPipe(pszName, pbInBuf, cbInBuf, pbOutBuf, cbOutBuf,
    pcbRead, ulTimeOut)
PSZ pszName;        /* pointer to pipe name               */
PBYTE pbInBuf;      /* pointer to input buffer            */
USHORT cbInBuf;     /* number of bytes in input buffer    */
PBYTE pbOutBuf;     /* pointer to output buffer           */
USHORT cbOutBuf;    /* number of bytes in output buffer   */
PUSHORT pcbRead;    /* pointer to variable for bytes read */
ULONG ulTimeOut;    /* timeout value                      */
 
The DosCallNmPipe function opens a named pipe, writes to and reads from it,
and closes it.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
pszName    Points to the name of the pipe. The name is in the form
           \pipe\name for a local pipe and \\server\pipe\name for a remote
           pipe.
 
pbInBuf    Points to the buffer containing the data that is written to the
           pipe.
 
cbInBuf    Specifies the size (in bytes) of the input buffer.
 
pbOutBuf   Points to the output buffer that receives the data read from the
           pipe.
 
cbOutBuf   Specifies the size (in bytes) of the output buffer.
 
pcbRead    Points to the variable that receives the number of bytes read
           from the pipe.
 
ulTimeOut  Specifies a value (in milliseconds) that is the amount of time MS
           OS/2 should wait for the pipe to become available.
 
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_SEM_TIMEOUT
 
Comments
 
The DosCallNmPipe function is equivalent to calling DosOpen,
DosTransactNmPipe, and DosClose.
 
See Also
 
DosMakePipe, DosTransactNmPipe