Rev 5622 | Rev 7433 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5622 | Rev 6708 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | enum { |
8 | enum { |
9 | MULTIPLE, |
9 | MULTIPLE, |
10 | SINGLE |
10 | SINGLE |
11 | }; |
11 | }; |
Line -... | Line 12... | ||
- | 12 | ||
- | 13 | #define MAX_PROCESS_COUNT 256 |
|
12 | 14 | ||
13 | :int CheckProcessExists(dword proc_name) { |
15 | :int CheckProcessExists(dword proc_name) { |
14 | int i; |
16 | int i; |
15 | proc_info Process; |
17 | proc_info Process; |
16 | for (i=0; i<1000; i++;) |
18 | for (i=0; i |
17 | { |
19 | { |
18 | GetProcessInfo(#Process, i); |
20 | GetProcessInfo(#Process, i); |
19 | if (strcmpi(#Process.name, proc_name)==0) return 1; |
21 | if (strcmpi(#Process.name, proc_name)==0) return 1; |
20 | } |
22 | } |
21 | return 0; |
23 | return 0; |
Line 22... | Line 24... | ||
22 | } |
24 | } |
23 | 25 | ||
24 | :void KillProcessByName(dword proc_name, byte multiple) { |
26 | :void KillProcessByName(dword proc_name, byte multiple) { |
25 | int i; |
27 | int i; |
26 | proc_info Process; |
28 | proc_info Process; |
27 | for (i=0; i<1000; i++;) |
29 | for (i=0; i |
28 | { |
30 | { |
29 | GetProcessInfo(#Process, i); |
31 | GetProcessInfo(#Process, i); |
30 | if (strcmpi(#Process.name, proc_name)==0) |
32 | if (strcmpi(#Process.name, proc_name)==0) |