-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemdata.h
37 lines (33 loc) · 956 Bytes
/
memdata.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
#ifndef MEMDATA_H
#define MEMDATA_H
#include <windows.h>
#include <iostream>
#include <vector>
class MemData
{
public:
MemData(DWORD);
~MemData();
void padBuffer(int);
static void fillProcLists();
static std::vector<std::wstring> getProcNamelist() { return proc_namelist; }
static std::vector<DWORD> getProcIDlist() {return proc_idlist; }
unsigned char* getBuffer() { return buf; }
long getSize() { return size; }
void** getRegions() { return regions; }
SIZE_T* getRegionSizes() { return region_sizes; }
int getNRegions() { return n_regions; }
void* findAddr(long);
void cmpBytes(MemData*, bool);
private:
void readMem(DWORD);
static std::vector<std::wstring> proc_namelist;
static std::vector<DWORD> proc_idlist;
unsigned char *buf;
long size;
const long maxsize = 1000000000; // 1000mb
void **regions;
SIZE_T *region_sizes;
int n_regions;
};
#endif // MEMDATA_H