TCnProcess.StandardOutput Property

Gets a stream used to read the textual output of the application.

Namespace: CNClrLib.Component.Process
 property StandardOutput: _StreamReader read GetStandardOutput;

Property Value

Type: _StreamReader

A StreamReader that can be used to read the standard output stream of the application.

When a Process writes text to its standard stream, that text is normally displayed on the console. By redirecting the StandardOutput stream, you can manipulate or suppress the output of a process. For example, you can filter the text, format it differently, or write the output to both the console and a designated log file.


To use StandardOutput, you must set TClrProcessStartInfo.UseShellExecute to false, and you must set TClrProcessStartInfo.RedirectStandardOutput to true. Otherwise, reading from the StandardOutput stream throws an exception.