about summary refs log tree commit diff stats
path: root/WitnessRandomizer/Memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WitnessRandomizer/Memory.cpp')
-rw-r--r--WitnessRandomizer/Memory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/WitnessRandomizer/Memory.cpp b/WitnessRandomizer/Memory.cpp index 8ad5452..92a5136 100644 --- a/WitnessRandomizer/Memory.cpp +++ b/WitnessRandomizer/Memory.cpp
@@ -18,7 +18,7 @@ Memory::Memory(const std::string& processName) {
18 } 18 }
19 } 19 }
20 if (!_handle) { 20 if (!_handle) {
21 OutputDebugStringA("Process is not open!\n"); 21 std::cout << "Couldn't find " << processName.c_str() << ", is it open?" << std::endl;
22 exit(EXIT_FAILURE); 22 exit(EXIT_FAILURE);
23 } 23 }
24 24
@@ -38,7 +38,7 @@ Memory::Memory(const std::string& processName) {
38 } 38 }
39 } 39 }
40 if (_baseAddress == 0) { 40 if (_baseAddress == 0) {
41 OutputDebugStringA("Couldn't find base address!\n"); 41 std::cout << "Couldn't find the base process address!" << std::endl;
42 exit(EXIT_FAILURE); 42 exit(EXIT_FAILURE);
43 } 43 }
44} 44}
@@ -52,7 +52,7 @@ Memory::~Memory() {
52void Memory::ThrowError() { 52void Memory::ThrowError() {
53 std::string message(256, '\0'); 53 std::string message(256, '\0');
54 FormatMessageA(4096, NULL, GetLastError(), 1024, &message[0], static_cast<DWORD>(message.length()), NULL); 54 FormatMessageA(4096, NULL, GetLastError(), 1024, &message[0], static_cast<DWORD>(message.length()), NULL);
55 OutputDebugStringA(message.c_str()); 55 std::cout << message.c_str() << std::endl;
56 exit(EXIT_FAILURE); 56 exit(EXIT_FAILURE);
57} 57}
58 58