[Date Prev][Date
Next][Thread Prev][Thread Next][Date
Index][Thread Index]
Re: [OT] - killing a windows process?
- To: <ukha_d@xxxxxxx>
- Subject: Re: [OT] - killing a windows process?
- From: "jim" <jim@xxxxxxx>
- Date: Thu, 6 Mar 2003 09:55:32 -0700
- Mailing-list: list ukha_d@xxxxxxx; contact
ukha_d-owner@xxxxxxx
- Reply-to: ukha_d@xxxxxxx
paul,
You need to use the TerminateProcess API call to kill it as the
end_process=
command does in TaskManager.
You should really send an wm_close command first as this is the polite way
=
- but doesnt always work, TerminateProcess, chops it off at the knees. If
y=
ou do a search on google for this and VB there are loads of examples. The
h=
ardest part is getting the processID - which is easier if you started the
p=
rocess as you will already have it.
Cheers
Jim
---------- Original Message ----------------------------------
From: "Paul Gordon" <paul_gordon@xxxxxxx>
Reply-To: ukha_d@xxxxxxx
Date: Thu, 06 Mar 2003 16:39:26 +0000
><html><body>
>
>
><tt>
>Question for the win32 programmers among us...<BR>
><BR>
>(Oh, and the process I want to kill is homeseer.exe, so it's not
*totally*=
<BR>
>OT...)<BR>
><BR>
>Anyone know how to programatically kill a running process under Windows
(X=
P <BR>
>in this case...). I need to be able to be certain that the process has
bee=
n <BR>
>terminated completely, just as surely as if I use the task manager GUI
and=
<BR>
>use the "End Process" button...<BR>
><BR>
>My initial thoughts have been...<BR>
><BR>
>a) Use the Resource Kit "Kill" utility, - but this is a bit
of a bodge as =
<BR>
>I'd have to shell out to run it...<BR>
><BR>
>b) Use the Win32 API directly, this would be my preferred method, but I
<B=
R>
>don't know what call I need, or how to call it from VB. (or even if
that i=
s <BR>
>possible?)=A0 I'm guessing I need the WM_CLOSE API call? Bear in mind
that=
I <BR>
>don't know the process ID, so I also need to enumerate that at
run-time...=
<BR>
><BR>
>Any ideas/suggestions?=A0 - code snippets... :-)<BR>
><BR>
>TIA<BR>
><BR>
>Paul G.<BR>
><BR>
><BR>
><BR>
><BR>
><BR>
><BR>
><BR>
><BR>
>_________________________________________________________________<BR>
>Express yourself with cool emoticons <a href=3D"http://messenger.msn.co.uk=
">http://messenger.msn.co.uk</a><BR>
><BR>
></tt>
>
><br>
>
><!-- **begin egp html banner** -->
>
><table border=3D0 cellspacing=3D0 cellpadding=3D2>
><tr bgcolor=3D#FFFFCC>
><td align=3Dcenter><font size=3D"-1"
color=3D#003399><b>Yahoo! Groups Spon=
sor</b></font></td>
></tr>
><tr bgcolor=3D#FFFFFF>
><td align=3Dcenter width=3D470><table border=3D0
cellpadding=3D0 cellspaci=
ng=3D0><tr><td align=3Dcenter><br><a
href=3D"http://rd.yahoo.com/M=3D247865=
.3003379.4374531.2848452/D=3Degroupweb/S=3D1705041992:HM/A=3D1482387/R=3D0/=
*http://ads.x10.com/?bHlhaG9vaG0xLmRhd=3DRNDSITEID
>=3D1046968813%3eM=3D247865.3003379.4374531.2848452/D=3Degroupweb/S=3D17050=
41992:HM/A=3D1482387/R=3D1" target=3D_top><img src=3D"http://ads.x10.com/?Z=
3lhaG9vaG0xLmRhd=3DRNDSITEID
>=3D1046968813%3eM=3D247865.3003379.4374531.2848452/D=3Degroupweb/S=3D17050=
41992:HM/A=3D1482387/R=3D2" alt=3D"" width=3D"300"
height=3D"250" border=3D=
"0"></a></td></tr></table></td>
></tr>
><tr><td><img alt=3D"" width=3D1 height=3D1
src=3D"http://us.adserver.yahoo=
.com/l?M=3D247865.3003379.4374531.2848452/D=3Degroupmail/S=3D:HM/A=3D148238=
7/rand=3D495245917"></td></tr>
></table>
>
><!-- **end egp html banner** -->
>
>
><br>
><tt>
><a href=3D"http://www.automatedhome.co.uk">http://www.automatedhome.co.uk<=
/a> <BR>
>Post message: ukha_d@xxxxxxx <BR>
>Subscribe:=A0 ukha_d-subscribe@xxxxxxx <BR>
>Unsubscribe:=A0 ukha_d-unsubscribe@xxxxxxx <BR>
>List owner:=A0 ukha_d-owner@xxxxxxx</tt>
><br>
>
><br>
><tt>Your use of Yahoo! Groups is subject to the <a
href=3D"http://docs.yah=
oo.com/info/terms/">Yahoo! Terms of Service</a>.</tt>
></br>
>
></body></html>
>
>
=20
=20=20=20=20=20=20=20=20=20=20=20=20=20
http://www.automatedhome.co.uk=20
Post message: ukha_d@xxxxxxx=20
Subscribe: ukha_d-subscribe@xxxxxxx=20
Unsubscribe: ukha_d-unsubscribe@xxxxxxx=20
List owner: ukha_d-owner@xxxxxxx=20
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20
Home |
Main Index |
Thread Index
|