🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Open cmd.exe from shortcut, execute command

#3126
From: Remy Lebeau (TeamB)
Date: Mon, 16 Oct 2006 17:27
16 lines
1622 bytes
"vortic" <vortic@users.sourceforge.net> wrote in message
news:453187e4$1@newsgroups.borland.com...

> I open Cmd.exe instead of the app directly, as I like to run it through
> a command window because the app auto closes and I like to look
> at the output.

If you use CreateProcess() to run the console application directly, you can
capture the output and display it in your own program.  CreateProcess()
allows you to assign your own handles for STDIN/STDOUT/STDERR.  So your
program could use CreatePipe() to create handles for STDOUT and STDERR, and
then use ReadFile() to receive any data the console application outputs.


Gambit
Technical Details
Message-ID: <4533c151@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4531423c$1@newsgroups.borland.com> <45316a45$1@newsgroups.borland.com> <453187e4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c75cbeeeafb4b920
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4531423c$1@newsgroups.borland.com> <45316a45$1@newsgroups.borland.com> <453187e4$1@newsgroups.borland.com>
Subject: Re: Open cmd.exe from shortcut, execute command
Date: Mon, 16 Oct 2006 10:27:06 -0700
Lines: 18
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: 69.169.4.232
Message-ID: <4533c151@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1161019729 69.169.4.232 (16 Oct 2006 10:28:49 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail