From 9503fc300e1c2d9fcddcf5b8ecc009cd4429337a Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Fri, 26 Oct 2018 21:09:12 -0700 Subject: Change offsets to #defines, support new version --- WitnessRandomizer/Memory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'WitnessRandomizer/Memory.cpp') 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) { } } if (!_handle) { - OutputDebugStringA("Process is not open!\n"); + std::cout << "Couldn't find " << processName.c_str() << ", is it open?" << std::endl; exit(EXIT_FAILURE); } @@ -38,7 +38,7 @@ Memory::Memory(const std::string& processName) { } } if (_baseAddress == 0) { - OutputDebugStringA("Couldn't find base address!\n"); + std::cout << "Couldn't find the base process address!" << std::endl; exit(EXIT_FAILURE); } } @@ -52,7 +52,7 @@ Memory::~Memory() { void Memory::ThrowError() { std::string message(256, '\0'); FormatMessageA(4096, NULL, GetLastError(), 1024, &message[0], static_cast(message.length()), NULL); - OutputDebugStringA(message.c_str()); + std::cout << message.c_str() << std::endl; exit(EXIT_FAILURE); } -- cgit 1.4.1