diff options
author | jbzdarkid <jbzdarkid@gmail.com> | 2019-11-04 10:04:49 -0800 |
---|---|---|
committer | jbzdarkid <jbzdarkid@gmail.com> | 2019-11-04 10:04:49 -0800 |
commit | e2c0268d4b82e170605d9cc43e26be7f38f2eb54 (patch) | |
tree | cb679ee56a44ec30d09176bec61ef4d9355bfcfb /Source/Memory.h | |
parent | 0cb49374a6d86100cd6f3bf838e79bdbac242a8e (diff) | |
download | witness-tutorializer-e2c0268d4b82e170605d9cc43e26be7f38f2eb54.tar.gz witness-tutorializer-e2c0268d4b82e170605d9cc43e26be7f38f2eb54.tar.bz2 witness-tutorializer-e2c0268d4b82e170605d9cc43e26be7f38f2eb54.zip |
Better, I guess
Diffstat (limited to 'Source/Memory.h')
-rw-r--r-- | Source/Memory.h | 8 |
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 |
14 | class Memory | 14 | class Memory { |
15 | { | ||
16 | public: | 15 | public: |
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 | |||
51 | private: | 48 | private: |
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++) { |