How to kill process by name in Windows using WinAPI?
Sometimes you may need to terminate (kill) a process in Windows. Why may you need this? For example, you have a kiosk and you need some application to be constantly running (the Kiosk GUI), but this application is written not perfectly, it hangs. You cannot make it work better, because it's not you who wrote it. You can write a small helper application that will be checking the status of an application, say, by sending some messages to its window. And if the application window does not respond, your tiny app will just kill the GUI app and restart it.
Leaving sending messages and re-launching applications out of the scope of this small article, let's find out how to actually kill the application.