I am aware that there is an API call which will kill/destroy a process or program, but I have no idea what it is and can’t find it on the Microsoft site.
Does anyone know what it is or have a link to a page which has it?
Thanks
James
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » An API call query (Acc2k VBA)
Sounds like you need to pay a visit to http://www.allapi.net/. Off the top of my head I don’t know which call you need, but you’ll find it there in their API guide.
James, there is ExitProcess (nice) and TerminateProcess (nasty). As Brooke says, AllAPI.net is the place to go for how to use them. Also, if you’re going to get hooked on API calls, you need Dan Appleman’s Visual Basic Programmer’s Guide to the Win32 API. Have fun!
Hi Sam
Thanks for the advice about the 2 different calls, problem is that ExitProcess is for the current process that calls it (which is what I do NOT want) and TerminateProcess should do what I want, but doesn’t.
I’ll definitely remember too look out for the book if I get more into API calls.
James
I confess I’ve never had to use it, and most of what I’ve seen concerning this sort of thing says it should only be done as an absolute last resort, and may involve enumerating an application’s windows, checking whether they’re enabled and then posting the close message. It could also be that you have a windowless application, in which case I think you’ll need PostAppMessage.
Hope that’s of some use? Incidentally, can you post the code you have got, on the off chance someone can see why it’s not working?
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications