|
Isn't the part that it writes to a txt file unnecessary? You could just strcmp() the array of process names you get one by one inside the app and then call terminateprocess() to end it. Once you have the name/PID, grab the handle with OpenProcess() and pass it to TerminateProcess()
|