Reads and writes to a named pipe in one network operation
_NamedPipes_TransactNamedPipe ( $hNamedPipe, $pInpBuf, $iInpSize, $pOutBuf, $iOutSize [, $tOverlapped = 0] )
|$hNamedPipe||The handle to the named pipe|
|$pInpBuf||Pointer to the buffer containing the data to be written to the pipe|
|$iInpSize||Size of the write buffer, in bytes|
|$pOutBuf||Pointer to the buffer that receives the data read from the pipe|
|$iOutSize||Size of the read buffer, in bytes|
|$tOverlapped||[optional] a $tagOVERLAPPED structure.
This structure is required if $hNamedPipe was opened with $PIPE_FLAG_OVERLAPPED.
If $hNamedPipe was opened with $PIPE_FLAG_OVERLAPPED, $tOverlapped must not be 0.
If $hNamedPipe was opened with $PIPE_FLAG_OVERLAPPED and $tOverlapped is not 0, _NamedPipes_TransactNamedPipe() is executed as an overlapped operation.
The $tagOVERLAPPED structure should contain a manual reset event object.
If the operation cannot be completed immediately, _NamedPipes_TransactNamedPipe() returns False and _WinAPI_GetLastError() will return ERROR_IO_PENDING.
|Success:||the number of bytes read from the pipe.|
|Failure:||sets the @error flag to non-zero.|
TransactNamedPipe fails if the server did not create the pipe as a message-type pipe or if the pipe handle is not in message-read mode.
Search TransactNamedPipe in MSDN Library.