🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Terminating An EXE

#11786
From: CBoss
Date: Wed, 14 Jan 2004 13:22
41 lines
2138 bytes
Thanks Rodolfo it works...!




"Rodolfo Frino - Macrosoft" <Microhaven@Atlantis.com> wrote in message
news:4004c10a@newsgroups.borland.com...
> Use sendMessage() API to send the WM_CLOSE message to the
> process you want to terminate. For example:
>
>  HWND hWindow = FindWindow(NULL, "Terminator");
>
>   if (hWindow)
>       SendMessage(hWindow, WM_CLOSE, 0, 0);
>   else
>      ShowMessage("FindWindow failed");  // or any other error function or
> throw exception
>
> Rodolfo
>
>
> "CBoss" <arifcimen@prowise.com.tr> wrote in message
> news:40042f84@newsgroups.borland.com...
> > Hi all,
> >
> > How can I terminate a program (exe) in code.
> >
> > For example the program I want to terminate is "TEST.exe",
> >
> > And the program I want to terminate "TEST.exe" in is "Terminator.exe".
> >
> > What is the code I need in "Terminator.exe".
> >
> > Thanks A Lot,
> >
> > Arif.
> >
> >
> >
>
>
Technical Details
Message-ID: <4005429e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!easynet-monga!easynet.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!bnewsoutpeer01.bru.ops.eu.uu.net!bnewsinpeer01.bru.ops.eu.uu.net!emea.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40042f84@newsgroups.borland.com> <4004c10a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,b7295d63393a6959
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-14 05:34:56 PST
From: "CBoss" <arifcimen@prowise.com.tr>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40042f84@newsgroups.borland.com> <4004c10a@newsgroups.borland.com>
Subject: Re: Terminating An EXE
Date: Wed, 14 Jan 2004 15:22:54 +0200
Lines: 43
Organization: Prowise
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 212.175.1.51
Message-ID: <4005429e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1074086558 212.175.1.51 (14 Jan 2004 05:22:38 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!easynet-monga!easynet.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!bnewsoutpeer01.bru.ops.eu.uu.net!bnewsinpeer01.bru.ops.eu.uu.net!emea.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail