Problem with passing Single values in Inno Setup on x64

47 views
Skip to first unread message

Марат Гайдуллин

unread,
2:36 AM (14 hours ago) 2:36 AM
to innosetup

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.

Martijn Laan

unread,
2:39 AM (14 hours ago) 2:39 AM
to innosetup
Hi,

Thanks for the report. Could you please post an example script reproducing the problem?

Greetings,
Martijn 




-------- Original Message --------
--
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.

Martijn Laan

unread,
4:08 AM (12 hours ago) 4:08 AM
to innosetup
Hi,

The problem might be related to this bit of code, which is commented out:
https://github.com/remobjects/pascalscript/blob/40bd700393bb9815bf0dd13252368fbc656e8833/Source/x64.inc#L127

Did not write or comment out this myself, will investigate.

Thank you for sending me the example directly. I don't quite understand it though. The only thing using Single is your TestSetBoundsMsg, but it isn't called anywhere?

Greetings,
Martijn

Op 16-3-2026 om 07:33 schreef Марат Гайдуллин:
--

Марат Гайдуллин

unread,
9:07 AM (7 hours ago) 9:07 AM
to innosetup

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.


понедельник, 16 марта 2026 г. в 12:08:35 UTC+4, Martijn Laan:

Марат Гайдуллин

unread,
11:03 AM (5 hours ago) 11:03 AM
to innosetup
Good evening. I have compiled a test for x64 and x86 https://drive.google.com/file/d/18xuiqZMDDl_W9O3h4azCwOBSqyb_4AD9/view?usp=drive_link

понедельник, 16 марта 2026 г. в 17:07:05 UTC+4, Марат Гайдуллин:

Martijn Laan

unread,
11:25 AM (5 hours ago) 11:25 AM
to innosetup
Hi,

I was able to fix the issue and improve some related things, so in the next preview/version using Single as you are should work fine.


Greetings,
Martijn

Op 16-3-2026 om 07:33 schreef Марат Гайдуллин:

Subject: Problem with passing Single values in Inno Setup on x64

--

Марат Гайдуллин

unread,
12:45 PM (4 hours ago) 12:45 PM
to innosetup
Hi Martijn,

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.

It seems that in my scenario, the fourth XMM register (XMM3) is not being correctly filled for Single parameters. I suspect this may affect any cases where more than three float/Single parameters are passed.

I wanted to ask: is it currently possible to handle more than three Single parameters correctly in Pascal Script x64? If not, I may need to avoid using SetBounds for multiple Single parameters, but this does not seem like a viable long-term solution, as there will be other cases with more than four parameters.

Thank you for your time and investigation.

Best regards,

понедельник, 16 марта 2026 г. в 19:25:33 UTC+4, Martijn Laan:

Martijn Laan

unread,
1:49 PM (3 hours ago) 1:49 PM
to innosetup


Op 16-3-2026 om 17:45 schreef Марат Гайдуллин:
Thank you for the patch you sent earlier. I have tested it with my example, and I can confirm the following:

You mean you pulled and compiled my GitHub changes, right? Thanks for doing that.



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.

I found this issue as well and fixed it.

Greetings,
Martijn

Марат Гайдуллин

unread,
2:59 PM (1 hour ago) 2:59 PM
to innosetup
Hi Martijn,

Thank you very much for the fix.
I tested the updated version and can confirm that the Single parameters are now passed correctly.

I really appreciate the quick investigation and solution.

Best regards.

понедельник, 16 марта 2026 г. в 21:49:18 UTC+4, Martijn Laan:
Reply all
Reply to author
Forward
0 new messages