Opened 13 years ago
Last modified 13 years ago
#2015 closed Bug
DllCallbackRegister() mangles floating point numbers under x64 — at Version 2
Reported by: | wraithdu | Owned by: | |
---|---|---|---|
Milestone: | 3.3.9.0 | Component: | AutoIt |
Version: | 3.3.7.15 | Severity: | None |
Keywords: | dllcallbackregister x64 float | Cc: |
Description (last modified by Valik)
Parameters of type "float" are mangled when passed to DllCallbackRegister() callback functions under x64. The following script demonstrates the problem:
Local $hCallback = DllCallbackRegister("Callback", "none", "double;float;") Local $pCallback = DllCallbackGetPtr($hCallback) DLLCallAddress("none", $pCallback, "double", 1234, "float", 1234) Func Callback($fDouble, $fFloat) ConsoleWrite("Double: " & $fDouble & @CRLF) ConsoleWrite("Float: " & $fFloat & @CRLF) EndFunc
The double output is correct. Float output is mangled and changes with each invocation.
Change History (2)
comment:1 Changed 13 years ago by anonymous
comment:2 Changed 13 years ago by Valik
- Description modified (diff)
- Keywords dllcallbackregister added; dllcalladdress removed
- Summary changed from DllCallAddress Corrupts float Type under x64 to DllCallbackRegister() mangles floating point numbers under x64
This is NOT a problem with DllCall() or DllCallAddress(). This is a bug with DllCallbackRegister(). I'm changing the description accordingly. The example script I am going to add is representative of a way to reproduce the problem. I have confirmed with my own DLL that DllCall() does not corrupt the data.
Note: See
TracTickets for help on using
tickets.
I suppose, there are some erros in the fastcall-implementation for the XMM-Registers either in DllCallAddress or DllCallback.