explicitly use the ASCII version of Windows APIs when building to avoid conflict when UNICODE/_UNICODE def is defined (base.cpp)

This commit is contained in:
a 2023-11-12 05:47:43 +02:00
parent 3afde6e996
commit 3999818a6b

View File

@ -833,7 +833,7 @@ BOOL WINAPI DllMain( HINSTANCE, DWORD dwReason, LPVOID ) {
DetourAttach( &(PVOID &)Real_Connect, Mine_Connect ); DetourAttach( &(PVOID &)Real_Connect, Mine_Connect );
DetourAttach( &(PVOID &)Real_WSAConnect, Mine_WSAConnect ); DetourAttach( &(PVOID &)Real_WSAConnect, Mine_WSAConnect );
HMODULE winhttp = GetModuleHandle("winhttp.dll"); HMODULE winhttp = GetModuleHandleA("winhttp.dll");
if (winhttp) { if (winhttp) {
Real_WinHttpConnect = (decltype(Real_WinHttpConnect))GetProcAddress(winhttp, "WinHttpConnect"); Real_WinHttpConnect = (decltype(Real_WinHttpConnect))GetProcAddress(winhttp, "WinHttpConnect");
DetourAttach( &(PVOID &)Real_WinHttpConnect, Mine_WinHttpConnect ); DetourAttach( &(PVOID &)Real_WinHttpConnect, Mine_WinHttpConnect );