kolibrios/programs/cmm/lib/patterns/restart_process.h
Kirill Lipatov (Leency) 85f85fa6d0 Appearance and Pixie fixes, upload TTF Viewer v0.1
git-svn-id: svn://kolibrios.org@5548 a494cfbc-eb01-0410-851d-a64ba20cac60
2015-03-25 11:46:22 +00:00

19 lines
343 B
C

enum {
MULTIPLE,
SINGLE
};
void RestartProcessByName(dword proc_name, byte multiple) {
int i;
proc_info Process;
for (i=0; i<1000; i++;)
{
GetProcessInfo(#Process, i);
if (strcmpi(#Process.name, proc_name)==0)
{
KillProcess(Process.ID);
if (multiple==SINGLE) break;
}
}
RunProgram(proc_name, "");
}