Opened 13 years ago
Closed 11 years ago
#2066 closed Bug (Fixed)
bad dllStructSetData return for int
Reported by: | Jpm | Owned by: | Jon |
---|---|---|---|
Milestone: | 3.3.9.21 | Component: | AutoIt |
Version: | 3.3.6.1 | Severity: | None |
Keywords: | Cc: |
Description (last modified by Jpm)
running the following script show a little discrepancy of a int64 return instead of an int32
Local $struct = DLLStructCreate("int") $n=DllStructSetData($struct,1,1) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $n = ' & $n & " " & VarGettype($n) & @crlf & '>Error code: ' & @error & ' Extended code: 0x' & Hex( @extended) & @crlf) ;### Debug Console $n=DLLStructGetData($struct,1) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $n = ' & $n & " " & VarGettype($n) & @crlf & '>Error code: ' & @error & ' Extended code: 0x' & Hex( @extended) & @crlf) ;### Debug Console
same under beta 23
Environment(Language:040C Keyboard:0000040C OS:WIN_7/Service Pack 1 CPU:X64 OS:X86)
Attachments (0)
Change History (6)
comment:1 Changed 13 years ago by Jpm
- Description modified (diff)
comment:2 Changed 13 years ago by jchd
comment:3 Changed 13 years ago by Jpm
In fact long, bool are alias of int
for unsigned 32-bit type as they cannot be stored without lost of precision the int64 is returned. This apply to wparam whish is unsigned
*_ptr does not mean ptr but ptr size
so when solving for int
DllStruct type --> returned type : expected type ; int --> Int64 Int32 (already mentionned) ; long --> Int64 Int32 ; bool --> Int64 Int32 ; int_ptr --> Int64 int32 ; uint_ptr --> Int64 int64 (unsigned) ; long_ptr --> Int64 int32 ; ulong_ptr --> Int64 int64 (unsigned) ; lresult --> Int64 int32 ; lparam --> Int64 int32 ; wparam --> Int64 int64 (ulong_ptr)
this will change under x64 as ptr will are 64-bit
comment:4 Changed 11 years ago by Jon
- Resolution set to Rejected
- Status changed from new to closed
comment:5 Changed 11 years ago by Jpm
- Resolution Rejected deleted
- Status changed from closed to reopened
comment:6 Changed 11 years ago by Jon
- Milestone set to 3.3.9.21
- Owner set to Jon
- Resolution set to Fixed
- Status changed from reopened to closed
Fixed by revision [8962] in version: 3.3.9.21
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
More unexpected readback types running .23 beta on x86.