From 00f4a0f89bbb0f3ca19cf76ec7b9d29f74fb5ca4 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 6 Apr 2025 13:19:09 +0300 Subject: [PATCH] [RICHED20] Enable thiscall wrappers for MSVC Properly fix thiscall functions by enabling thiscall wrappers on MSVC builds. See CORE-20079, CORE-20006 --- dll/win32/riched20/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dll/win32/riched20/CMakeLists.txt b/dll/win32/riched20/CMakeLists.txt index 242caf98ff5..15e448ac204 100644 --- a/dll/win32/riched20/CMakeLists.txt +++ b/dll/win32/riched20/CMakeLists.txt @@ -36,6 +36,11 @@ add_library(riched20 MODULE version.rc ${CMAKE_CURRENT_BINARY_DIR}/riched20.def) +if(MSVC AND ARCH STREQUAL "i386") + # MSVC doesn't support __thiscall in C code + target_compile_definitions(riched20 PRIVATE __ASM_USE_THISCALL_WRAPPER) +endif() + add_typelib(riched_tom.idl) add_dependencies(riched20 stdole2) set_module_type(riched20 win32dll)