From 49ff8348ff4fbd9a262b0ca9f1ff912f3ee91457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Jab=C5=82o=C5=84ski?= Date: Sun, 14 Apr 2024 19:23:22 +0200 Subject: [PATCH] Replace the #error directive with a FIXME comment --- COREDLL/dllmain.cpp | 7 +++++-- COREDLL/other.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/COREDLL/dllmain.cpp b/COREDLL/dllmain.cpp index 07f3dc2..58365a4 100644 --- a/COREDLL/dllmain.cpp +++ b/COREDLL/dllmain.cpp @@ -17,7 +17,7 @@ static struct EntrypointHijackCode[] = { {0x68, WceclEntrypointWrapper, 0xC3} }; #pragma pack(pop) #else -#error No patching code for non x86 architectures +/* FIXME: No patching code for architectures other than x86. */ #endif static BYTE EntrypointRepairCode[sizeof(EntrypointHijackCode)]; @@ -169,8 +169,11 @@ BOOL __stdcall DllMain(HMODULE hModule, CloseHandle(Info.hProcess); CloseHandle(Info.hThread); } - +#ifdef _M_IX86 WceclPatchEntrypoint(); +#else + /* FIXME: No patching code for architectures other than x86. */ +#endif break; }; case DLL_THREAD_ATTACH: diff --git a/COREDLL/other.cpp b/COREDLL/other.cpp index f330535..768421a 100644 --- a/COREDLL/other.cpp +++ b/COREDLL/other.cpp @@ -202,7 +202,7 @@ void* _fileno_WCECL(FILE* file) return result; } - /* https://stackoverflow.com/a/3989842 */ + /* https://stackoverflow.com/a/3989842 */ return (void*)_get_osfhandle(_fileno(file)); }