Modify ↓
Opened 14 years ago
Closed 12 years ago
#2066 closed Bug (Fixed)
bad dllStructSetData return for int
| Reported by: | J-Paul Mesnage | Owned by: | Jon |
|---|---|---|---|
| Milestone: | 3.3.9.21 | Component: | AutoIt |
| Version: | 3.3.6.1 | Severity: | None |
| Keywords: | Cc: |
Description (last modified by )
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 by , 14 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
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 by , 13 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
comment:5 by , 12 years ago
| Resolution: | Rejected |
|---|---|
| Status: | closed → reopened |
comment:6 by , 12 years ago
| Milestone: | → 3.3.9.21 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | reopened → closed |
Fixed by revision [8962] in version: 3.3.9.21
Note:
See TracTickets
for help on using tickets.

More unexpected readback types running .23 beta on x86.