杀死notepad.exe进程
#include <Windows.h>
#include <MMSystem.h>
#pragma comment(lib,"winmm.lib")
#pragma comment(linker,"/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
int main()
{
WinExec("cmd /c taskkill -f -im notepad.exe",SW_HIDE);
}
源码: