about summary refs log tree commit diff stats
path: root/WitnessRandomizer/Memory.h
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2018-10-24 20:20:12 -0700
committerjbzdarkid <jbzdarkid@gmail.com>2018-10-24 20:20:12 -0700
commit69a8f903ef70845894ff07e0805d9cc60597cc7c (patch)
treeb3a91870eea300b95732ce22c6ac8c1e94307bc9 /WitnessRandomizer/Memory.h
parent4f9229dfe609632a193ce515f8fa83b494948e48 (diff)
downloadwitness-tutorializer-69a8f903ef70845894ff07e0805d9cc60597cc7c.tar.gz
witness-tutorializer-69a8f903ef70845894ff07e0805d9cc60597cc7c.tar.bz2
witness-tutorializer-69a8f903ef70845894ff07e0805d9cc60597cc7c.zip
progress of various sorts
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 }