🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#13404
From: Bob Gonder
Date: Wed, 15 Oct 2003 19:31
13 lines
1429 bytes
Frank Birbacher wrote:

>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()
Put the Handles you want to use for communicating in the appropriate
fields...
    HANDLE  hStdInput; 
    HANDLE  hStdOutput; 
    HANDLE  hStdError; 
of the STARTUPINFO  structure passed to CreateProcess.
Technical Details
Message-ID: <mr7rovca3ekvqbieu440rfo1b516oib1q4@4ax.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 12:40:33 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: how can I redirect stdin/out of a system call?
Date: Wed, 15 Oct 2003 12:31:33 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <mr7rovca3ekvqbieu440rfo1b516oib1q4@4ax.com>
References: <3f8d96e0$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.165.20
X-Trace: newsgroups.borland.com 1066246293 67.31.165.20 (15 Oct 2003 12:31:33 -0700)
Lines: 17
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