2021-06-08 10:54:49 -07:00
|
|
|
#pragma once
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <Psapi.h>
|
2021-07-08 11:45:03 -07:00
|
|
|
#include <sinks/basic_file_sink.h>
|
2021-06-08 10:54:49 -07:00
|
|
|
|
2021-06-16 16:43:03 -07:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Internals
|
2021-06-08 10:54:49 -07:00
|
|
|
BOOL FileExists(LPCTSTR szPath);
|
|
|
|
MODULEINFO GetModuleInfo(const char* szModule);
|
2021-07-15 16:33:13 +02:00
|
|
|
std::uint8_t* PatternScan(const char* module, const char* signature);
|
2021-06-08 10:54:49 -07:00
|
|
|
|
2021-06-16 16:43:03 -07:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Utility
|
2021-06-08 10:54:49 -07:00
|
|
|
void DbgPrint(LPCSTR sFormat, ...);
|
2021-07-08 11:45:03 -07:00
|
|
|
void HexDump(const char* szHeader, int nFunc, const void* pData, int nSize);
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Loggers
|
|
|
|
inline auto g_spddefault_logger = spdlog::basic_logger_mt("default_logger", "platform\\log\\default_r5.log");
|
|
|
|
inline auto g_spdnetchan_logger = spdlog::basic_logger_mt("netchan_logger", "platform\\log\\netchan_r5.log");
|
2021-06-16 16:43:03 -07:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|