Article View: borland.public.cppbuilder.nativeapi
Article #14317Re: ProcessID mismatch after CreateProcess() call.
From: Remy Lebeau (TeamB)
Date: Fri, 15 Aug 2003 16:17
Date: Fri, 15 Aug 2003 16:17
26 lines
2278 bytes
2278 bytes
"Mark D" <m.davenSNIPport@ntlworld.com> wrote in message news:3f3d0282$1@newsgroups.borland.com... > This is what I would prefer to do except I my ProcessIds > don't match... The ProcessID I get from my instance of > PROCESS_INFORMATION does not match the processID > I get back from GetWindowThreadProcessId() when I know > I've got the window I want. I used GetWindowText just for > debugging. If a process does not create its own windows, then the only way you can close it down is to use specify CREATE_NEW_PROCESS_GROUP when calling CreateProcess() and then use GenerateConsoleCtrlEvent(). Otherwise, there is also TerminateProcess(), although it is a brute force termination. > As you suggested before, it looks like the app whose > name I am passing to CreateProcess()might be spawning > its own process. Would that make it a child process of > the process I spawned with the call to CreateProcess()? Probably, yes. I suppose it would depend on how the new process was being created. Gambit
Technical Details
Message-ID:
<3f3d0601$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f3b5fc8$1@newsgroups.borland.com> <3f3bc743$1@newsgroups.borland.com> <3f3bf72a$1@newsgroups.borland.com> <3f3c04d0$1@newsgroups.borland.com> <3f3c9692$1@newsgroups.borland.com> <3f3c9a38$1@newsgroups.borland.com> <3f3d0282$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,1f2bd942df162911 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-15 09:42:09 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f3b5fc8$1@newsgroups.borland.com> <3f3bc743$1@newsgroups.borland.com> <3f3bf72a$1@newsgroups.borland.com> <3f3c04d0$1@newsgroups.borland.com> <3f3c9692$1@newsgroups.borland.com> <3f3c9a38$1@newsgroups.borland.com> <3f3d0282$1@newsgroups.borland.com> Subject: Re: ProcessID mismatch after CreateProcess() call. Date: Fri, 15 Aug 2003 09:17:21 -0700 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f3d0601$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060963841 207.175.226.26 (15 Aug 2003 09:10:41 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail