about summary refs log tree commit diff stats
path: root/WitnessRandomizer/Memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'WitnessRandomizer/Memory.h')
-rw-r--r--WitnessRandomizer/Memory.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/WitnessRandomizer/Memory.h b/WitnessRandomizer/Memory.h index dc92349..adc1287 100644 --- a/WitnessRandomizer/Memory.h +++ b/WitnessRandomizer/Memory.h
@@ -2,6 +2,9 @@
2#include <vector> 2#include <vector>
3#include <map> 3#include <map>
4#include <windows.h> 4#include <windows.h>
5#include <thread>
6#include <chrono>
7using namespace std::chrono_literals;
5 8
6// https://github.com/erayarslan/WriteProcessMemory-Example 9// https://github.com/erayarslan/WriteProcessMemory-Example
7// http://stackoverflow.com/q/32798185 10// http://stackoverflow.com/q/32798185
@@ -22,6 +25,7 @@ public:
22 { 25 {
23 return data; 26 return data;
24 } 27 }
28 // std::this_thread::sleep_for(10ms);
25 } 29 }
26 ThrowError(); 30 ThrowError();
27 } 31 }
@@ -32,6 +36,7 @@ public:
32 if (WriteProcessMemory(_handle, (LPVOID)ComputeOffset(offsets), &data[0], sizeof(T) * data.size(), NULL)) { 36 if (WriteProcessMemory(_handle, (LPVOID)ComputeOffset(offsets), &data[0], sizeof(T) * data.size(), NULL)) {
33 return; 37 return;
34 } 38 }
39 // std::this_thread::sleep_for(10ms);
35 } 40 }
36 ThrowError(); 41 ThrowError();
37 } 42 }