Updated 02:11 AM on 10/05/2020
Added OpenProcess, TerminateProcess, Process32First, Process32Next, and CreateToolhelp32Snapshot functions from Kernel32 WinAPI. This set of functions allow for you to kill running processes by name or PID (process ID). These functions kill the program outright, similar to using Task Manager so the programs DO NOT close gracefully. It's useful for killing a rogue SHELL _DONTWAIT. However, if you want something to be closed gracefully then you should use the SendSignal executable which I have included in my folder with a SUB that I use to call it. It sends a quit signal to a running process and allows for it to close correctly without worry of corrupting files. I've included 3 functions in my source code that you can use for your own code. KillProcessByName, which accepts a STRING of the processname, KillProcessByPID, which accepts an _UNSIGNED INTEGER of the PID, and SoftKill, which accepts a STRING of the processname.