Article View: borland.public.cppbuilder.nativeapi
Article #12812Re: Closing another program
From: Remy Lebeau (TeamB)
Date: Tue, 18 Nov 2003 17:53
Date: Tue, 18 Nov 2003 17:53
23 lines
1837 bytes
1837 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message news:5hjkrvc8sljb887ni7t0geolt5m9fcmer3@4ax.com... > Use the ProcessHandle to get the ProcessID. You cannot obtain a Process ID from a Process handle. The reverse is possible, though - getting a handle from an ID. If you use CreateProcess() to start the program, then you will have both the ID and the handle, they are both returned directly. > If it does, then that's the window of your sub-process. To elaborate on that, you should not stop with the first window. You can continue to enumerate to find all of the windows of the program. The first window found is not guaranteed to be the main window. Also keep in mind that it is possible for programs to prevent their windows from being closed prematurely, so depending on the program that is being launched, it may or may not be so easy to close it down. Gambit
Technical Details
Message-ID:
<3fba5bf3$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fba0c7c@newsgroups.borland.com> <5hjkrvc8sljb887ni7t0geolt5m9fcmer3@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,36f59e3e03394bfd X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-18 10:09:58 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fba0c7c@newsgroups.borland.com> <5hjkrvc8sljb887ni7t0geolt5m9fcmer3@4ax.com> Subject: Re: Closing another program Date: Tue, 18 Nov 2003 09:53:49 -0800 Lines: 25 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.1165 NNTP-Posting-Host: 67.22.137.149 Message-ID: <3fba5bf3$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069177843 67.22.137.149 (18 Nov 2003 09:50:43 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail