WriteProgramData()

Syntax

Result = WriteProgramData(Program, *Buffer, size)
Description
Writes the data from the buffer to the specified programs input (stdin). The program must have been started with RunProgram() and the #PB_Program_Write flag.

A special value of #PB_Program_Eof can be used for the *Buffer parameter to make the program receive an EOF (end of file) in its input. (Which tells it that there will be no more input). The 'Size' parameter is ignored in this case. After calling WriteProgramData() with this special value, no more input can be written to the program.

Return value

Returns the number of bytes that were actually written.

Supported OS

All

<- WaitProgram() - Process Index - WriteProgramString() ->