🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ProcessID mismatch after CreateProcess() call.

#14316
From: Mark D
Date: Fri, 15 Aug 2003 15:55
16 lines
2002 bytes
"Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> wrote:

>Rather than looking for a specific window, you should be using >EnumWindows() and GetWindowThreadProcessId() to find all >windows that belong to the given process and then close them >one at a time.

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.

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()?  

Mark
Technical Details
Message-ID: <3f3d0282$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
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>

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:10:22 PST
From: "Mark D" <m.davenSNIPport@ntlworld.com>
Sender: "Mark D" <m.davenSNIPport@ntlworld.com>
Reply-To: "Mark D" <m.davenSNIPport@ntlworld.com>
Subject: Re: ProcessID mismatch after CreateProcess() call.
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 213.121.212.121 213.121.212.121    
X-Forwarded-For: 10.250.0.101
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>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f3d0282$1@newsgroups.borland.com>
Date: 15 Aug 2003 08:55:46 -0700
X-Trace: newsgroups.borland.com 1060962946 207.105.83.65 (15 Aug 2003 08:55:46 -0700)
Lines: 18
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!skynet.be!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail