From e0b0fa10ad773a34a3cd338d32213f5f2af631c9 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Tue, 18 Dec 2018 16:56:04 -0500 Subject: [PATCH] add message function --- include/defs.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/defs.h b/include/defs.h index f43ca58..7372951 100644 --- a/include/defs.h +++ b/include/defs.h @@ -3,7 +3,7 @@ // vnrhook/defs.h // 8/23/2013 jichi -constexpr auto ITH_DLL = L"vnrhook"; +#include "common.h" // Pipes @@ -20,8 +20,19 @@ constexpr auto ITH_HOOKMAN_MUTEX_ = L"VNR_HOOKMAN_"; // ITH_HOOKMAN_%d // Files +constexpr auto ITH_DLL = L"vnrhook"; // .dll but LoadLibrary automatically adds that constexpr auto CONFIG_FILE = u8"Textractor.ini"; constexpr auto HOOK_SAVE_FILE = u8"SavedHooks.txt"; constexpr auto EXTEN_SAVE_FILE = u8"Extensions.txt"; +// Functions + +template +inline void FORMAT_MESSAGE(const wchar_t* format, Ts ...args) +{ + wchar_t buffer[250] = {}; + swprintf_s<250>(buffer, format, args...); + MessageBoxW(NULL, buffer, L"Textractor Message", MB_OK); +} + // EOF