Código
/** Simple process manager Coded By Doddy H **/ #include <windows.h> #include <Tlhelp32.h> #include <stdio.h> int main() { HANDLE parteuno,partedos; PROCESSENTRY32 control; int re,pid; while(1) { if (re==1) { parteuno = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); Process32First(parteuno,&control); while(Process32Next(parteuno,&control)){ } CloseHandle(parteuno); } else if (re==2) { partedos =OpenProcess(PROCESS_TERMINATE,0,pid); if (TerminateProcess(partedos,0)) { } else { } CloseHandle(partedos); } else if (re==3) { } } return 0; } /** The End ? **/