🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How do I detect if a windows program is running

#3213
From: Remy Lebeau (TeamB)
Date: Mon, 31 Jul 2006 00:29
17 lines
1464 bytes
"Robert E Mitchell, Sr." <n2963p@earthlink.net> wrote in message
news:44cc30ce$1@newsgroups.borland.com...

> I want to write a program that will detect if any of the
> programs are already running

    How To Enumerate Applications Using Win32 APIs
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;q175030

> and if they are, shut them down.

Once you find the desired .exe process, you will have its process ID.  You
can use OpenProcess() and TerminateProcess() to kill it.


Gambit
Technical Details
Message-ID: <44cd4f52$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44cc30ce$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8821223f4f1a60c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <44cc30ce$1@newsgroups.borland.com>
Subject: Re: How do I detect if a windows program is running
Date: Sun, 30 Jul 2006 17:29:18 -0700
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <44cd4f52$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1154305874 68.69.17.41 (30 Jul 2006 17:31:14 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail