From a2fda59eebf3132e1a80622ae7ea272252c16f05 Mon Sep 17 00:00:00 2001 From: "Drew C." Date: Mon, 9 Mar 2026 20:16:56 -0500 Subject: [PATCH] Fix compiler error --- functions/screen_text.cpp | 2 +- minhook/bin/MinHook.x64.exp | Bin 2203 -> 0 bytes minhook/bin/MinHook.x86.exp | Bin 2282 -> 0 bytes minhook/include/MinHook.h | 185 ------------------------------------ 4 files changed, 1 insertion(+), 186 deletions(-) delete mode 100644 minhook/bin/MinHook.x64.exp delete mode 100644 minhook/bin/MinHook.x86.exp delete mode 100644 minhook/include/MinHook.h diff --git a/functions/screen_text.cpp b/functions/screen_text.cpp index dc72b33..459840a 100644 --- a/functions/screen_text.cpp +++ b/functions/screen_text.cpp @@ -41,7 +41,7 @@ static int L_Print_Screen_Text(lua_State* L) // Widen to wchar_t for the game's basic_string parameter. int wlen = MultiByteToWideChar(CP_ACP, 0, text, -1, nullptr, 0); std::wstring wtext(wlen - 1, L'\0'); - MultiByteToWideChar(CP_ACP, 0, text, -1, wtext.data(), wlen); + MultiByteToWideChar(CP_ACP, 0, text, -1, &wtext[0], wlen); // If the feed is full, evict the oldest entry. if (g_count >= MAX_LINES) diff --git a/minhook/bin/MinHook.x64.exp b/minhook/bin/MinHook.x64.exp deleted file mode 100644 index ad66dd6e3392334b6903e20667348fd85eba3a6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2203 zcmd5-O>f*(6upU)wnS=};9h?Ib7_ZD=zg>cUd+j9;ct@z|E_ zX@>|=kSgE@Ac4e&1*kj3uFFbnSfRoKsTpCl?#T1@3SiSsx>6OR$OXz!xsavZgepXsVruQT6djmtOVME6nirB1VF zIp#ewotHWAxMtda(~i+N88ktYw1@W6KANIw+D{j>zZwKPW`C(_x}HZDR=3WCq4)l! zp6V%=!$zc>MDd{E=uD_bgq1!^%Q|*i-eAg#pO4P@I?;}&cNGtnZ3^Q>8=kbTy1~`K zg3ZK9dhtfkOd{=fc$s&7{bX7Bz7zPU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deaV7j$-G_V}s zXsC^bvFb&3&<`BE;&#i}@_iQr+MxBO(p*xOnwqM~hphQwbX{9EknD!*c>4;kg(K6d zT$VdXq*U(fszkV^IWjH-z23l4X;uF0Yy>5t*OzfVT9x;@5L_MVjd)g0N)D$|UvDCz zv??blN5%zk6sQ~p#s!2oN5>V0Vf=NR(j3SZ8-k}0 zPbsQ8hy93^^j*&H zQ>OH-%?Dei@NmQIAqhT*7xxLe{hM$`Us0x@8~5T{BI$E*Ik1R69w`eODy&Xl=9C8A z$tg?pLr!VZuQ}y4snd9^c;;nUI<1_hS-5FMqxqcjI;mNuu2L(f)ahzYX;5dR;KlHt zF*e?{_%=+mSm85IELP4XF4|b(J1MbP*-Kosv2svQc#ji{`+SzTXk+E8g7RHK`8lKf z29Gm1Tkx!83q7kG6?j363!CL^L9>!6ITkVn%)&zocO(}^X9|_O6$+HaTw(qTgs8s9 diff --git a/minhook/include/MinHook.h b/minhook/include/MinHook.h deleted file mode 100644 index 492d83f..0000000 --- a/minhook/include/MinHook.h +++ /dev/null @@ -1,185 +0,0 @@ -/* - * MinHook - The Minimalistic API Hooking Library for x64/x86 - * Copyright (C) 2009-2017 Tsuda Kageyu. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#pragma once - -#if !(defined _M_IX86) && !(defined _M_X64) && !(defined __i386__) && !(defined __x86_64__) - #error MinHook supports only x86 and x64 systems. -#endif - -#include - -// MinHook Error Codes. -typedef enum MH_STATUS -{ - // Unknown error. Should not be returned. - MH_UNKNOWN = -1, - - // Successful. - MH_OK = 0, - - // MinHook is already initialized. - MH_ERROR_ALREADY_INITIALIZED, - - // MinHook is not initialized yet, or already uninitialized. - MH_ERROR_NOT_INITIALIZED, - - // The hook for the specified target function is already created. - MH_ERROR_ALREADY_CREATED, - - // The hook for the specified target function is not created yet. - MH_ERROR_NOT_CREATED, - - // The hook for the specified target function is already enabled. - MH_ERROR_ENABLED, - - // The hook for the specified target function is not enabled yet, or already - // disabled. - MH_ERROR_DISABLED, - - // The specified pointer is invalid. It points the address of non-allocated - // and/or non-executable region. - MH_ERROR_NOT_EXECUTABLE, - - // The specified target function cannot be hooked. - MH_ERROR_UNSUPPORTED_FUNCTION, - - // Failed to allocate memory. - MH_ERROR_MEMORY_ALLOC, - - // Failed to change the memory protection. - MH_ERROR_MEMORY_PROTECT, - - // The specified module is not loaded. - MH_ERROR_MODULE_NOT_FOUND, - - // The specified function is not found. - MH_ERROR_FUNCTION_NOT_FOUND -} -MH_STATUS; - -// Can be passed as a parameter to MH_EnableHook, MH_DisableHook, -// MH_QueueEnableHook or MH_QueueDisableHook. -#define MH_ALL_HOOKS NULL - -#ifdef __cplusplus -extern "C" { -#endif - - // Initialize the MinHook library. You must call this function EXACTLY ONCE - // at the beginning of your program. - MH_STATUS WINAPI MH_Initialize(VOID); - - // Uninitialize the MinHook library. You must call this function EXACTLY - // ONCE at the end of your program. - MH_STATUS WINAPI MH_Uninitialize(VOID); - - // Creates a hook for the specified target function, in disabled state. - // Parameters: - // pTarget [in] A pointer to the target function, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. - MH_STATUS WINAPI MH_CreateHook(LPVOID pTarget, LPVOID pDetour, LPVOID *ppOriginal); - - // Creates a hook for the specified API function, in disabled state. - // Parameters: - // pszModule [in] A pointer to the loaded module name which contains the - // target function. - // pszProcName [in] A pointer to the target function name, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. - MH_STATUS WINAPI MH_CreateHookApi( - LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal); - - // Creates a hook for the specified API function, in disabled state. - // Parameters: - // pszModule [in] A pointer to the loaded module name which contains the - // target function. - // pszProcName [in] A pointer to the target function name, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. - // ppTarget [out] A pointer to the target function, which will be used - // with other functions. - // This parameter can be NULL. - MH_STATUS WINAPI MH_CreateHookApiEx( - LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal, LPVOID *ppTarget); - - // Removes an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - MH_STATUS WINAPI MH_RemoveHook(LPVOID pTarget); - - // Enables an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - // If this parameter is MH_ALL_HOOKS, all created hooks are - // enabled in one go. - MH_STATUS WINAPI MH_EnableHook(LPVOID pTarget); - - // Disables an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - // If this parameter is MH_ALL_HOOKS, all created hooks are - // disabled in one go. - MH_STATUS WINAPI MH_DisableHook(LPVOID pTarget); - - // Queues to enable an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - // If this parameter is MH_ALL_HOOKS, all created hooks are - // queued to be enabled. - MH_STATUS WINAPI MH_QueueEnableHook(LPVOID pTarget); - - // Queues to disable an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - // If this parameter is MH_ALL_HOOKS, all created hooks are - // queued to be disabled. - MH_STATUS WINAPI MH_QueueDisableHook(LPVOID pTarget); - - // Applies all queued changes in one go. - MH_STATUS WINAPI MH_ApplyQueued(VOID); - - // Translates the MH_STATUS to its name as a string. - const char * WINAPI MH_StatusToString(MH_STATUS status); - -#ifdef __cplusplus -} -#endif