🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.nativeapi
Article #12172

Re: ShellExecute, programs return code

#12172
From: Will DeWitt
Date: Fri, 22 Nov 2002 20:17
24 lines
1912 bytes
"Vijayan Pillai" <blahblah@hotmail.com> wrote in message
news:3dde5e91$1@newsgroups.borland.com...
> "Ed Dressel" <none> wrote:
> >I am running a program using ShellExecute and need to know the return
code
> >of the program. How can I get that?
>
http://newsgroups.borland.com/cgi-bin/dnewsweb?cmd=article&group=borland.pub
lic.delphi.nativeapi&item=5000&utag=

grin, already having my post linked to is kind of flattering.  ;)

It's a start, but what he also needs to do is use GetExitCodeProcess on the
hProcess handle returned from ShellExecuteEx (the thread Vijayan linked to
has an example of how to use ShellExecuteEx to also return the hProcess, but
the Platform SDK docs are also kind of self explanatory on this).  Wait for
the app to close (using one of the Wait functions), then use
GetExitCodeProcess to grab the result.

Will

--
http://qc.borland.com - download the client and vote for the Win32 API
header translation (report 1230)!
Technical Details
Message-ID: <3dde90a8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.online.be!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail
References: <3dde5a05$1@newsgroups.borland.com> <3dde5e91$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f94dd,efeb8efadb52eec4
X-Google-Attributes: gidf94dd,public
X-Google-ArrivalTime: 2002-11-22 13:16:05 PST
From: "Will DeWitt" <edge@NO.SPAM_boink.net>
Newsgroups: borland.public.delphi.nativeapi
References:  <3dde5a05$1@newsgroups.borland.com> <3dde5e91$1@newsgroups.borland.com>
Subject: Re: ShellExecute, programs return code
Date: Fri, 22 Nov 2002 12:17:28 -0800
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 66.171.63.57
Message-ID: <3dde90a8$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1037996200 66.171.63.57 (22 Nov 2002 12:16:40 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.online.be!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail