#include "stdafx.h" #include #include void DragonHook::Utils::Message(const std::string& text) { MessageBox(nullptr, (LPCTSTR)text.c_str(), nullptr, MB_OK); } std::vector DragonHook::Utils::Split(const std::string& input, const std::string& regex) { // passing -1 as the submatch index parameter performs splitting const std::regex re(regex); const std::sregex_token_iterator first{ input.begin(), input.end(), re, -1 }; const std::sregex_token_iterator last; return { first, last }; } std::string DragonHook::Utils::AddressToString(DWORD address) { char szBuffer[1024]; sprintf(szBuffer, "0x%02lx", address); return std::string(szBuffer); }