Basically, I have a program which will be launched more than once. So, there will be two or more processes launched of the program.
I want to use the Win32 API and kill/terminate all the processes with a specific name.
I have seen examples of killing A process, but not multiple processes with the exact same name(but different parameters).
Try below code,
killProcessByName()will kill any process with namefilename:Note: The code is case sensitive to
filename, you can edit it for case insensitive.