> I have written a simple com component that shells out to a Command Line
> program.
>
> The program writes its output to the standard output device.
>
> What I want to do is capture this text output, does anyone know if it is
> possible?
>
> Do I have to redirect it to a file and then get read the file?

When you are doing the shelling you firstly set your standard in standard
error file handles to some useful file handle(s). This may be a file, a
pipe or what ever takes your fancy. The standard in should be pointed at
the nul device so that any reads on it will return EOF.

Once the program is spawned then you can go anout restoring all the
standard file handles back to their default values. You did save these
before by duping them didn't you? (8-)

Have a look fomr some standard Windows command line spawning components,
these should have examples of the gymnastics used to achieve this sort of
thing.

Cheers, Max.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to