Function Reference


_NamedPipes_TransactNamedPipe

Reads and writes to a named pipe in one network operation

#include <NamedPipes.au3>
_NamedPipes_TransactNamedPipe ( $hNamedPipe, $pInpBuf, $iInpSize, $pOutBuf, $iOutSize [, $tOverlapped = 0] )

Parameters

$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, TransactNamedPipe is executed as an overlapped operation.
    The $tagOVERLAPPED structure should contain a manual reset event object.
    If the operation cannot be completed immediately, TransactNamedPipe returns False and GetLastError will return ERROR_IO_PENDING.

Return Value

Success: the number of bytes read from the pipe.
Failure: sets the @error flag to non-zero.

Remarks

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.

Related

$tagOVERLAPPED, _NamedPipes_CallNamedPipe

See Also

Search TransactNamedPipe in MSDN Library.