🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: redirect stdin

#12158
From: Arthur Jelsma
Date: Tue, 23 Dec 2003 20:53
29 lines
1820 bytes
How would you typically handle a console window for 
"ftp a.b.c.d" where the app handles the username and
password using stdin? I have no problems using stdout
with "netstat -an", for instance, but I must be missing
something for stdin. I created pipes for stdout,
stdin, and stderr and assigned the handles but the console
application hangs. Thanks for your help.

Michel Leunen <mleu@STOPSPAMskynet.be> wrote:
>Arthur Jelsma wrote:
>
>> Using BCB5 Pro on Windows 2000, I have built an app that
>> creates a console window and redirects stdout to my code.
>> Now I want to redirect stdin. Do I need to do another CreatePipe
>> for my stdin handle?
>
>Yes. And if your console app uses stderr, you have to create a pipe for 
>it as well.
>
>Michel
>-- 
>----------------------------------------
>Michel Leunen
>mailto:michel@leunen.com
>C++Builder, C++BuilderX, BCC5.5.1 Web site:
>http://www.leunen.com/
>----------------------------------------
>
Technical Details
Message-ID: <3fe8b95f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fe785e9$1@newsgroups.borland.com> <3fe82715@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,ba86b8c6dd456663
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-23 14:09:52 PST
From: "Arthur Jelsma" <jelsma@wapa.gov>
Sender: "Arthur Jelsma" <jelsma@wapa.gov>
Reply-To: "Arthur Jelsma" <jelsma@wapa.gov>
Subject: Re: redirect stdin
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 207.109.125.201     
References: <3fe785e9$1@newsgroups.borland.com> <3fe82715@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <3fe8b95f@newsgroups.borland.com>
Date: 23 Dec 2003 13:53:35 -0700
X-Trace: newsgroups.borland.com 1072216415 207.105.83.66 (23 Dec 2003 13:53:35 -0700)
Lines: 30
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail