Writes to a duplex message pipe, then reads from it.

#define INCL_DOSNMPIPES
#include <os2.h>

HPIPE     hpipe;    /*  A named-pipe handle. */
PVOID     pOutbuf;  /*  A pointer to the buffer that is to be written to the pipe. */
ULONG     cbOut;    /*  The number of bytes to be written. */
PVOID     pInbuf;   /*  A pointer to the buffer for returned data. */
ULONG     cbIn;     /*  The maximum size, in bytes, of returned data. */
PULONG    pcbRead;  /*  A pointer to the number of bytes read. */
APIRET    ulrc;     /*  Return Code. */

ulrc = DosTransactNPipe(hpipe, pOutbuf, cbOut,
         pInbuf, cbIn, pcbRead);


[Back] [Next]