Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2005 Sep : Communicate with command line prog vial stdin/stdout?

www.cryer.info
Managed Newsgroup Archive

Communicate with command line prog vial stdin/stdout?

Subject:Communicate with command line prog vial stdin/stdout?
Posted by:"Kjell Rilbe" (krilbe...@mblock.home.se)
Date:Thu, 22 Sep 2005 12:44:24

Hi,

I need my Delphi 7 program to start a command line program and then
write commands to it via its stdin and read its stdout.

I need to have a sequence like this:

1. Launch command line program (CMDPRG).
2. Write command to CMDPRG.
3. Read response from CMDPRG.
4. Repeat steps 2-3 a large number of times.
5. Terminate CMDPRG (by writing an "exit" command).

How can I do this?

Thanks,
Kjell
--
---------------------------------------------------------------------------
Kjell Rilbe
Home: +46 8 7610734
Cell: +46 733 442464
---------------------------------------------------------------------------
"If there's a price for bein' me, that's one I'll have to pay"
Aaron Tippin
---------------------------------------------------------------------------

Replies:

www.cryer.info
Managed Newsgroup Archive