D1: Writing to "stdin" - reading from "stdout" for DOS program (or Win32)

Hi,

with Delphi 1  I would like to do the following:

a) Execute a DOS application
b) Rrite something to that application's "stdin"
c) Read something from that application's "stdout"
d) Optionally read something from "stderr"

Alternatively: How could that be done with a Win32 console
application?

Please note that I am trying to perform all this with Delphi 1.02
Would that be possible with Delphi 2?

What for? PGP (Pretty Good Privacy) offers an option which allows
streams of data sent to it and which sends data back (this is a plain
DOS executable). The above way of calling it should be much more
"secure" than writing files.

TIA!
Stefan
--
Stefan Hoffmeister  (Stefan.Hoffmeis...@Uni-Passau.de)
University of Passau, Bavaria, Germany