forked from KolibriOS/kolibrios
85f85fa6d0
git-svn-id: svn://kolibrios.org@5548 a494cfbc-eb01-0410-851d-a64ba20cac60
19 lines
343 B
C
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, "");
|
|
} |