Function Reference


Performs a read/write operation on a named pipe

#include <NamedPipes.au3>
_NamedPipes_CallNamedPipe ( $sPipeName, $pInpBuf, $iInpSize, $pOutBuf, $iOutSize, ByRef $iRead [, $iTimeOut = 0] )


$sPipeName Pipe name
$pInpBuf Pointer to the buffer containing the data 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
$iRead On return, contains the number of bytes read from the pipe
$iTimeOut [optional] Number of milliseconds to wait for the named pipe to be available.
In addition to numeric values, the following special values can be specified:
    -1 - Wait indefinitely
    0 - Uses the default time-out specified in the call to the CreateNamedPipe
    1 - Do not wait. If the pipe is not available, return an error

Return Value

Success: True.
Failure: False.


Calling CallNamedPipe is equivalent to calling the CreateFile (or WaitNamedPipe, if CreateFile cannot open the pipe immediately), TransactNamedPipe, and CloseHandle functions.
CreateFile is called with an access flag of GENERIC_READ | GENERIC_WRITE, and an inherit handle flag of False.
CallNamedPipe fails if the pipe is a byte-type pipe.


_NamedPipes_TransactNamedPipe, _NamedPipes_WaitNamedPipe

See Also

Search CallNamedPipe in MSDN Library.