DelphiDabbler Wiki



Console Application Runner ClassesStdOut property

Project: Console Application Runner Classes

Unit: PJConsoleApp

Classes: TPJCustomConsoleApp, TPJConsoleApp

Introduced: v1.0

property StdOut: THandle;

Description

This property is used to optionally redirect a console application's standard output.

If StdOut is set to 0 no redirection takes place.

Setting the property to a valid inheritable handle causes all output that the console application writes to standard output to actually be written to the specified handle.

The default property value is 0.

Remarks

When redirecting, the output handle can be attached to any object that is open for writing. Normally this will be a file or a pipe.

Up until v2.0 you could use this project's TPJPipe and TPJFileHandle[v2.0] classes to help with opening pipes and files with inheritable handles. These classes were removed at v3.0, but are still available from the I/O Utility Classes project.

The property is public in TPJConsoleApp and protected in TPJCustomConsoleApp.

Page last modified on March 25, 2013, at 03:50 PM