How can I kill a process (exe) in C++. Example say notepad.exe is running and I can see it in process viewer. I need to kill or terminate this process using c++. I only have the name of the exe/process.
Also I need to restart the process later.
I can use TerminateProcess by I don't know how to get the handle of the process.