about summary refs log tree commit diff stats
path: root/Source/Memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Memory.h')
-rw-r--r--Source/Memory.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Memory.h b/Source/Memory.h index 9c00dab..f70de6a 100644 --- a/Source/Memory.h +++ b/Source/Memory.h
@@ -11,8 +11,7 @@
11// http://stackoverflow.com/q/32798185 11// http://stackoverflow.com/q/32798185
12// http://stackoverflow.com/q/36018838 12// http://stackoverflow.com/q/36018838
13// http://stackoverflow.com/q/1387064 13// http://stackoverflow.com/q/1387064
14class Memory 14class Memory {
15{
16public: 15public:
17 Memory(); 16 Memory();
18 bool Initialize(const std::wstring& processName); 17 bool Initialize(const std::wstring& processName);
@@ -46,11 +45,12 @@ public:
46 void AddSigScan(const std::vector<byte>& scanBytes, const std::function<void(int index)>& scanFunc); 45 void AddSigScan(const std::vector<byte>& scanBytes, const std::function<void(int index)>& scanFunc);
47 int ExecuteSigScans(); 46 int ExecuteSigScans();
48 47
49 void ClearOffsets() {_computedAddresses = std::map<uintptr_t, uintptr_t>();}
50
51private: 48private:
52 template<class T> 49 template<class T>
53 std::vector<T> ReadData(const std::vector<int>& offsets, size_t numItems) { 50 std::vector<T> ReadData(const std::vector<int>& offsets, size_t numItems) {
51 if (GetExitCodeProcess(_process) != STILL_ACTIVE) {
52 // Signal error, somehow
53 }
54 std::vector<T> data; 54 std::vector<T> data;
55 data.resize(numItems); 55 data.resize(numItems);
56 for (int i=0; i<5; i++) { 56 for (int i=0; i<5; i++) {