From 3999818a6bac0061b7d2c17885ee598ccc6d0145 Mon Sep 17 00:00:00 2001 From: a Date: Sun, 12 Nov 2023 05:47:43 +0200 Subject: [PATCH] explicitly use the ASCII version of Windows APIs when building to avoid conflict when UNICODE/_UNICODE def is defined (base.cpp) --- dll/base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/base.cpp b/dll/base.cpp index ab52edae..5a37ab04 100644 --- a/dll/base.cpp +++ b/dll/base.cpp @@ -833,7 +833,7 @@ BOOL WINAPI DllMain( HINSTANCE, DWORD dwReason, LPVOID ) { DetourAttach( &(PVOID &)Real_Connect, Mine_Connect ); DetourAttach( &(PVOID &)Real_WSAConnect, Mine_WSAConnect ); - HMODULE winhttp = GetModuleHandle("winhttp.dll"); + HMODULE winhttp = GetModuleHandleA("winhttp.dll"); if (winhttp) { Real_WinHttpConnect = (decltype(Real_WinHttpConnect))GetProcAddress(winhttp, "WinHttpConnect"); DetourAttach( &(PVOID &)Real_WinHttpConnect, Mine_WinHttpConnect );