1 |
e6a01bd8
|
Pultak
|
namespace LDClient.detection;
|
2 |
0932a9e2
|
Pultak
|
|
3 |
e6a01bd8
|
Pultak
|
/// <summary>
|
4 |
|
|
/// This interface defines the functionality of all methods that
|
5 |
|
|
/// are used to work with processes (within this project).
|
6 |
|
|
/// </summary>
|
7 |
|
|
public interface IProcessUtils {
|
8 |
|
|
|
9 |
12899c8b
|
silhavyj
|
/// <summary>
|
10 |
e6a01bd8
|
Pultak
|
/// Checks if a process is running or not.
|
11 |
12899c8b
|
silhavyj
|
/// </summary>
|
12 |
e6a01bd8
|
Pultak
|
/// <param name="name">Name of the process</param>
|
13 |
|
|
/// <returns>True, if the process is running. False otherwise.</returns>
|
14 |
|
|
public bool IsProcessRunning(string name);
|
15 |
0932a9e2
|
Pultak
|
|
16 |
e6a01bd8
|
Pultak
|
/// <summary>
|
17 |
|
|
/// Executes a new process (t32rem.exe) with arguments which are passed in
|
18 |
|
|
/// as a parameter of the method.
|
19 |
|
|
/// </summary>
|
20 |
|
|
/// <param name="fileName">Path to the .exe file</param>
|
21 |
|
|
/// <param name="argument">Arguments passed into the .exe file</param>
|
22 |
|
|
/// <param name="timeout">Timeout used when waiting for the process to terminate</param>
|
23 |
|
|
/// <param name="desiredExitCode">Status code indicating a successful termination of the process.</param>
|
24 |
|
|
/// <returns>True, if the command was executed successfully. False otherwise.</returns>
|
25 |
|
|
public bool ExecuteNewProcess(string fileName, string argument, int timeout, int desiredExitCode);
|
26 |
|
|
}
|