Re: End Processes
- Posted by andi49 Apr 29, 2011
- 1426 views
dcole said...
andi49 said...
maybe this links will help
usage of taskkill http://msdn.microsoft.com/en-us/library/bb491009.aspx
or WinApi with TerminateProcess http://msdn.microsoft.com/en-us/library/ms686714%28v=vs.85%29.aspx
Andreas
Thank you Andreas,
But I don't know how to wrap these Apis.
Don Cole
Hallo
At least taskkill is no API Call.
It's an commandline tool that comes with Windows (I think since WinXP). You can try it in the Windows Console. It's %WINDIR%\system32\taskkill.exe (and so normally in the %PATH%)
Example:
taskkill /f /im notepad.exe
this will terminate "all" tasks of notepad.exe.
So a
system("taskkill /f /im notepad.exe",2)
should do it.
On pre XP Systems (NT,2000) the command was kill.exe. For Win9.x i don't know it.
I hope this helps you.
Andreas