about summary refs log tree commit diff stats
path: root/WitnessRandomizer/Memory.h
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2018-10-22 21:32:20 -0700
committerjbzdarkid <jbzdarkid@gmail.com>2018-10-22 21:32:20 -0700
commit4da4677cb662108502791e49078df386949c0e21 (patch)
tree3b9380a3a253b776e3b4a083717d1d89053571a9 /WitnessRandomizer/Memory.h
parentf255be24d96352c43ec5197cf1bfd6a5a7bb47be (diff)
downloadwitness-tutorializer-4da4677cb662108502791e49078df386949c0e21.tar.gz
witness-tutorializer-4da4677cb662108502791e49078df386949c0e21.tar.bz2
witness-tutorializer-4da4677cb662108502791e49078df386949c0e21.zip
Ideas & bugs & zzzzz
Diffstat (limited to 'WitnessRandomizer/Memory.h')
-rw-r--r--WitnessRandomizer/Memory.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/WitnessRandomizer/Memory.h b/WitnessRandomizer/Memory.h index 2453cf0..6b50948 100644 --- a/WitnessRandomizer/Memory.h +++ b/WitnessRandomizer/Memory.h
@@ -24,10 +24,11 @@ public:
24 } 24 }
25 25
26 template <class T> 26 template <class T>
27 void WriteData(const std::vector<int>& offsets, const std::vector<T>& data) { 27 bool WriteData(const std::vector<int>& offsets, const std::vector<T>& data) {
28 if (!WriteProcessMemory(_handle, (LPVOID)ComputeOffset(offsets), &data[0], sizeof(T) * data.size(), NULL)) { 28 if (!WriteProcessMemory(_handle, (LPVOID)ComputeOffset(offsets), &data[0], sizeof(T) * data.size(), NULL)) {
29 ThrowError(); 29 return false;
30 } 30 }
31 return true;
31 } 32 }
32 33
33private: 34private: