🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13408

Re: how can I redirect stdin/out of a system call?

#13408
From: Remy Lebeau (TeamB)
Date: Wed, 15 Oct 2003 19:56
15 lines
1475 bytes
"Frank Birbacher" <bloodymir.crap@gmx.net> wrote in message
news:3f8d96e0$1@newsgroups.borland.com...

> I want to start programs from within my program, and I want
> to feed the child program my information, and I want to retrive
> the output of the child program. What possibilities are there?

Use CreateProcess().  It allows you to specify your own STDIN/OUT/ERR
handles for the new process.  You can then use CreatePipe() and
GetStdHandle() to specify the handles, and use ReadFile() to read the data
from the output pipe(s).


Gambit
Technical Details
Message-ID: <3f8da5dc@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f8d96e0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,673bf07b9afc34b7
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-15 13:11:05 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f8d96e0$1@newsgroups.borland.com>
Subject: Re: how can I redirect stdin/out of a system call?
Date: Wed, 15 Oct 2003 12:56:16 -0700
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.137.75
Message-ID: <3f8da5dc@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1066247644 67.22.137.75 (15 Oct 2003 12:54:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail