2016-01-05 23:01:17 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// vnrhook/defs.h
|
|
|
|
// 8/23/2013 jichi
|
|
|
|
|
2018-12-19 05:56:04 +08:00
|
|
|
#include "common.h"
|
2016-01-05 23:01:17 +08:00
|
|
|
|
|
|
|
// Pipes
|
|
|
|
|
2018-11-04 17:00:14 +08:00
|
|
|
constexpr auto HOOK_PIPE = L"\\\\.\\pipe\\TEXTRACTOR_HOOK";
|
|
|
|
constexpr auto HOST_PIPE = L"\\\\.\\pipe\\TEXTRACTOR_HOST";
|
2016-01-05 23:01:17 +08:00
|
|
|
|
|
|
|
// Sections
|
|
|
|
|
2018-11-04 17:00:14 +08:00
|
|
|
constexpr auto ITH_SECTION_ = L"VNR_SECTION_"; // _%d
|
2016-01-05 23:01:17 +08:00
|
|
|
|
|
|
|
// Mutex
|
|
|
|
|
2018-11-04 17:00:14 +08:00
|
|
|
constexpr auto ITH_HOOKMAN_MUTEX_ = L"VNR_HOOKMAN_"; // ITH_HOOKMAN_%d
|
|
|
|
|
|
|
|
// Files
|
|
|
|
|
2018-12-19 05:56:04 +08:00
|
|
|
constexpr auto ITH_DLL = L"vnrhook"; // .dll but LoadLibrary automatically adds that
|
2018-11-04 17:00:14 +08:00
|
|
|
constexpr auto CONFIG_FILE = u8"Textractor.ini";
|
|
|
|
constexpr auto HOOK_SAVE_FILE = u8"SavedHooks.txt";
|
2019-01-15 17:32:00 +08:00
|
|
|
constexpr auto GAME_SAVE_FILE = u8"SavedGames.txt";
|
|
|
|
constexpr auto EXTEN_SAVE_FILE = u8"SavedExtensions.txt";
|
2018-11-04 17:00:14 +08:00
|
|
|
|
2018-12-19 05:56:04 +08:00
|
|
|
// Functions
|
|
|
|
|
2019-01-15 17:32:00 +08:00
|
|
|
template <typename... Args>
|
|
|
|
inline void FORMAT_MESSAGE(const char* format, Args... args)
|
2018-12-19 05:56:04 +08:00
|
|
|
{
|
2018-12-21 00:02:22 +08:00
|
|
|
char buffer[250] = {};
|
|
|
|
sprintf_s<250>(buffer, format, args...);
|
|
|
|
MessageBoxA(NULL, buffer, "Textractor Message", MB_OK);
|
2018-12-19 05:56:04 +08:00
|
|
|
}
|
|
|
|
|
2018-12-27 12:56:42 +08:00
|
|
|
#ifdef _DEBUG
|
2018-12-27 13:18:05 +08:00
|
|
|
#define TEST(...) static auto _ = std::invoke([]{ __VA_ARGS__; return 0; })
|
2018-12-27 12:56:42 +08:00
|
|
|
#else
|
|
|
|
#define TEST(...)
|
|
|
|
#endif
|
|
|
|
|
2016-01-05 23:01:17 +08:00
|
|
|
// EOF
|