Opened 16 years ago
Closed 16 years ago
#1355 closed Bug (Fixed)
Data types mixed
| Reported by: | trancexx | Owned by: | Valik |
|---|---|---|---|
| Milestone: | 3.3.3.0 | Component: | AutoIt |
| Version: | 3.3.2.0 | Severity: | None |
| Keywords: | Cc: |
Description
With new 3.3.2.0 version there are issue(s) with data types with DllCall() function.
If I ask for dword AutoIt returns int. For example:
$sFile = "NonExistingFile"
$aCall = DllCall("kernel32.dll", "dword", "CreateFileW", _
"wstr", $sFile, _
"dword", 0x80000000, _ ; GENERIC_READ
"dword", 0, _ ; prevent sharing
"ptr", 0, _
"dword", 3, _ ; OPEN_EXISTING
"dword", 0, _
"ptr", 0)
$hFile = $aCall[0]
ConsoleWrite("! " & $hFile & @CRLF)
MsgBox(0, '$hFile is', $hFile & @CRLF)
Same thing is for any parameter. If I do "dword*", 0 , i get int value returned.
I could write an example with GdipBitmapGetPixel from gdiplus.dll if you need it to verify this additionally. For non-transparent white it will return -1 instead of asked (and proper) 4294967295 (0xFFFFFFFF).
Attachments (0)
Change History (4)
comment:1 by , 16 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
| Version: | 3.3.0.0 → 3.3.2.0 |
comment:2 by , 16 years ago
Ok, I see that.
This is a change in behavior. dword type with DllCall() no longer have sense, since it's treated as int.
I can find my way thru Bit functions and will switch to that. Even though that slows scripts further.
This ain't changed:
$tDword = DllStructCreate("dword")
DllStructSetData($tDword, 1, 0xFFFFFFFF)
ConsoleWrite(DllStructGetData($tDword, 1) & @CRLF)
It's a bad change from my perspective.
comment:4 by , 16 years ago
| Milestone: | → 3.3.3.0 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | reopened → closed |
Fixed by revision [5497] in version: 3.3.3.0

AutoIt displays all values as signed integers. The values you are working with are unsigned. The same bits are set in either case. This is not a bug.