SysPipeWindowsWrite (FUN)

FUNCTION SysPipeWindowsWrite : RTS_IEC_RESULT

This function can be used to write a defined number of bytes to a named pipe area.

InOut:

Scope

Name

Type

Comment

Return

SysPipeWindowsWrite

RTS_IEC_RESULT

Error code:
  • ERR_OK: Success

  • ERR_PARAMETER: Any of the following
    • hPipe = NULL

    • hPipe = RTS_INVALID_HANDLE

    • pbyBuffer = NULL

    • (dwTimeoutMs <> 0) AND (pipe was not opened with parameter xOverlapped = TRUE)

  • ERR_END_OF_OBJECT: Writing the pipe resulted in ERROR_BROKEN_PIPE

  • ERR_TIMEOUT: dwTimeoutMs has been nonzero and the specified timeout interval has elapsed.

  • ERR_NET_NOTCONNECTED: ERROR_PIPE_NOT_CONNECTED.

  • ERR_FAILED: Any other error (see log)

Input

hPipe

RTS_IEC_HANDLE

Handle to a SysPipeWindows instance

pbyBuffer

POINTER TO BYTE

Buffer

uxBytesToWrite

__UXINT

Number of bytes to write

puxBytesWritten

POINTER TO __UXINT

Number of bytes written to the named pipe

dwTimeoutMs

DWORD

Timeout in milliseconds for overlapped writing. Set to 0 for synchronous not overlapped writing. Has to be 0 if the pipe was not opened with parameter xOverlapped = TRUE.