-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathProc.h
51 lines (47 loc) · 1008 Bytes
/
Proc.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
#pragma once
#include "stdafx.h"
using namespace std;
//typedef vector<CString> VecCString;
struct HookInfo
{
CString m_strProcName;
CString m_strAddr;
CString m_strRetAddr;
CString m_strDLength;
CString m_strBytes;
CString m_strCode;
};
class Proc
{
public:
string m_strName;
DWORD m_dwAddr;
DWORD m_dwSize;
byte* m_btCode;
Proc();
~Proc();
void Clear();
bool FindDetourAddress(string strDLL, vector<HookInfo>* vecStrResult);
bool DumpFunction(string strDLL, vector<HookInfo>* vecDump);
//bool FindDetourAddress(HANDLE hProcess); // find out the address that we can use it to do detour hook
private:
};
class ProcList
{
public:
ProcList();
~ProcList();
vector<Proc>::iterator Begin();
vector<Proc>::iterator End();
void Copy(ProcList src);
void Clear();
int Size();
void Push_Back(Proc c);
void Pop_Back();
void Sort();
void Pop_Front();
Proc At(int i);
private:
void SortByIndex(int root);
vector<Proc> m_vecProcList;
};