Subject: Problem with passing Single values in Inno Setup on x64
Description:
Inno Setup does not pass Single values when calling DLL/interface methods on x64 — the values arrive as zero (0).
If the type is changed to Double, values are passed correctly, but this breaks the logic: UI elements jitter, coordinates and rotations behave incorrectly.
On x86, there are no problems — Single values pass correctly.
Summary:
Inno Setup on x64 does not marshal Single to Double, causing Single values to be lost entirely.
Using Double fixes the transmission, but introduces compatibility issues with existing logic.
Request:
Implement proper support for passing Single values through Inno Setup on x64, so that values are transmitted correctly without breaking interface logic on both x86 and x64 platforms.
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/a76823c5-22af-402d-94c8-ef3f89c07f44n%40googlegroups.com.
--
Hello,
Thank you for your reply. I was honestly impressed by how quickly you responded.
Let’s assume the following situation. I create a x64 DLL which exposes a wrapper around a standard UI control (for example a button or another control). Yes, I understand that this kind of usage may not be officially supported or documented, but it is still technically possible.
Inno Setup calls this wrapper to create the control. The coordinates and sizes are provided in the script and should be passed to the DLL as Single values (for example Left, Top, Width, Height).
However, when the function is called from Inno Setup on x64, all parameters declared as Single arrive in the DLL as 0.0. In other words, if the parameters are declared as Single, the DLL receives zeros.
When I change the parameters in the DLL to Double, the values are transmitted correctly and everything works.
But this should not be necessary — the parameters are supposed to work with Single, and on x86 they do work correctly.
So it seems that on x64 the Single values are not being passed correctly from Inno Setup to the DLL.
Subject: Problem with passing Single values in Inno Setup on x64
--
Thank you for the patch you sent earlier. I have tested it with my example, and I can confirm the following:
Parameters 1–3 (Left, Top, Width) are passed correctly.
The fourth parameter (Height), which is also a Single, still arrives as 0 in the DLL.