๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: CreateProcess,DOS,Map Results

#8018
From: Remy Lebeau (TeamB)
Date: Tue, 07 Dec 2004 17:19
19 lines
1820 bytes
"Eyyub Volkan ๏ฟฝektimur" <evcektimur@prokon.com.tr> wrote in message
news:41b5a31f@newsgroups.borland.com...

> I'm executing an DOS (Console) program with "CreateProcess" ,
> my wish is to get the results that have printed to DOS-Console by
> executed program. Is that possible ?

Use CreatePipe() to create a new pipe and then assign its handle to the
hStdOutput and hStdError members of the STARTUPINFO structure.  You also
need to specify the STARTF_USESTDHANDLES flag in the dwFlags member as well.
Then the application calling CreateProcess() can use ReadFile() to read the
console application's output and do whatever it wants with the text.

Please go to http://www.deja.com and do a search through the archives of
these newsgroups.  Sample code has been provided many times before.


Gambit
Technical Details
Message-ID: <41b5e633$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41b5a31f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,908334df422d7545
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41b5a31f@newsgroups.borland.com>
Subject: Re: CreateProcess,DOS,Map Results
Date: Tue, 7 Dec 2004 09:19:51 -0800
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <41b5e633$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1102439987 68.69.17.41 (7 Dec 2004 09:19:47 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail