https://git.reactos.org/?p=reactos.git;a=commitdiff;h=34b3377879783441a938dc...
commit 34b3377879783441a938dc69bdf26b8033837a33 Author: winesync ros-dev@reactos.org AuthorDate: Sun Mar 13 21:40:18 2022 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Sun Mar 20 19:28:37 2022 +0100
[WINESYNC] msi: Return an error if trying to run a 64-bit custom action in a 32-bit prefix.
This matches native behaviour (manually tested).
This allows the Research in Motion (Blackberry) USB and Modem driver to fail cleanly instead of hanging, if run in a 32-bit prefix.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
wine commit id 408662379281aa24f41b680f1aba9abf2b40c603 by Zebediah Figura z.figura12@gmail.com --- dll/win32/msi/custom.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c index 0ccb96d7d1b..b717c293eae 100644 --- a/dll/win32/msi/custom.c +++ b/dll/win32/msi/custom.c @@ -769,6 +769,13 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll( if (!ret) info->arch = (sizeof(void *) == 8 ? SCS_64BIT_BINARY : SCS_32BIT_BINARY);
+ if (info->arch == SCS_64BIT_BINARY && sizeof(void *) == 4 && !is_wow64) + { + ERR("Attempt to run a 64-bit custom action inside a 32-bit WINEPREFIX.\n"); + free_custom_action_data( info ); + return NULL; + } + custom_start_server(package, info->arch);
info->handle = CreateThread(NULL, 0, custom_client_thread, info, 0, NULL);