Article View: borland.public.cppbuilder.nativeapi
Article #10446Re: GetExitCodeProcess
From: Karsten Becker
Date: Thu, 08 Apr 2004 17:11
Date: Thu, 08 Apr 2004 17:11
33 lines
2118 bytes
2118 bytes
Hi Gambit I think you misundeerstood me. Maybe i wasn't clear enough. My problem isn't spawnlp, my problem is GetExitCodeProcess. In my opinion it doesn't matter which function i use (spawnlp or CreateProcess) because both will return the (same) ProcessID. Sure, i could use CreateProcess to keep the handle as well but that's not the point where it goes wrong... With OpenProcess() I'm getting the handle of the program i have triggered and then i check with GetExitCode wether that program is alive or not. This is the point where it goes wrong. The GetExitCodeProcess returns the correct status on WinXP but on Win2K it fails. It returns 0. My question now is why? Am i missing something? How should i solve this problem? Karsten "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> schreef in bericht news:407584c9$1@newsgroups.borland.com... > > "Karsten Becker" <Kars@home.nl> wrote in message > news:4075429c@newsgroups.borland.com... > > > In my program i start another application by spawnlp. > > Use CreateProcess() instead of spawnl(). It returns both the the process ID > and process handle, then you don't need OpenProcess() anymore. > > > Gambit > >
Technical Details
Message-ID:
<407587a4@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4075429c@newsgroups.borland.com> <407584c9$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,9f115a8db4592134 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-04-08 10:40:06 PST From: "Karsten Becker" <Kars@test.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4075429c@newsgroups.borland.com> <407584c9$1@newsgroups.borland.com> Subject: Re: GetExitCodeProcess Date: Thu, 8 Apr 2004 19:11:23 +0200 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 NNTP-Posting-Host: 213.84.117.173 Message-ID: <407587a4@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1081444260 213.84.117.173 (8 Apr 2004 10:11:00 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail