TCnProcess.StandardInput Property

Gets a stream used to write the input of the application.

Namespace: CNClrLib.Component.Process
 property StandardInput: _StreamWriter read GetStandardInput;

Property Value

Type: _StreamWriter

A StreamWriter that can be used to write the standard input stream of the application.

A Process can read input text from its standard input stream, typically the keyboard. By redirecting the StandardInput stream, you can programmatically specify the input. For example, instead of using keyboard input, you can provide text from the contents of a designated file or output from another application.


To use StandardInput, you must set TClrProcessStartInfo.UseShellExecute to false, and you must set TClrProcessStartInfo.RedirectStandardInput to true. Otherwise, writing to the StandardInput stream throws an exception.