Subversion Repositories Kolibri OS

Rev

Rev 5598 | Rev 6708 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5598 Rev 5622
Line 8... Line 8...
8
enum {
8
enum {
9
	MULTIPLE,
9
	MULTIPLE,
10
	SINGLE
10
	SINGLE
11
};
11
};
Line -... Line 12...
-
 
12
 
-
 
13
:int CheckProcessExists(dword proc_name) {
-
 
14
	int i;
-
 
15
	proc_info Process;
-
 
16
	for (i=0; i<1000; i++;)
-
 
17
	{
-
 
18
		GetProcessInfo(#Process, i);
-
 
19
		if (strcmpi(#Process.name, proc_name)==0) return 1;
-
 
20
	}
-
 
21
	return 0;
-
 
22
}
12
 
23
 
13
void RestartProcessByName(dword proc_name, byte multiple) {
24
:void KillProcessByName(dword proc_name, byte multiple) {
14
	int i;
25
	int i;
15
	proc_info Process;
26
	proc_info Process;
16
	for (i=0; i<1000; i++;)
27
	for (i=0; i<1000; i++;)
17
	{
28
	{
Line 20... Line 31...
20
		{ 
31
		{ 
21
			KillProcess(Process.ID); 
32
			KillProcess(Process.ID); 
22
			if (multiple==SINGLE) break;
33
			if (multiple==SINGLE) break;
23
		}
34
		}
24
	}
35
	}
-
 
36
}
-
 
37
 
-
 
38
:void RestartProcessByName(dword proc_name, byte multiple) {
-
 
39
	KillProcessByName(proc_name, multiple);
25
	RunProgram(proc_name, "");	
40
	RunProgram(proc_name, "");	
26
}
41
}
Line -... Line 42...
-
 
42
 
27
 
43
 
28
#endif
44
#endif