Modify ↓
Opened 15 years ago
Closed 15 years ago
#1541 closed Bug (Fixed)
_WinAPI_FillRect not x64 safe
Reported by: | Ascend4nt | Owned by: | Jpm |
---|---|---|---|
Milestone: | 3.3.7.0 | Component: | AutoIt |
Version: | 3.3.6.0 | Severity: | None |
Keywords: | _WinAPI_FillRect UDF | Cc: |
Description
This code from the _WinAPI_FillRect UDF is not properly created for x64 mode. "dword" is not the same size as "handle" in x64 mode. This conditional statement should be modified:
If IsPtr($hBrush) Then $aResult = DllCall("user32.dll", "int", "FillRect", "handle", $hDC, "ptr", $ptrRect, "handle", $hBrush) Else $aResult = DllCall("user32.dll", "int", "FillRect", "handle", $hDC, "ptr", $ptrRect, "dword", $hBrush) EndIf
Instead of two alternate calls to FillRect, one would suffice. The If/Else can be removed, and the last parameter can be changed to "dword_ptr":
$aResult = DllCall("user32.dll", "int", "FillRect", "handle", $hDC, "ptr", $ptrRect, "dword_ptr", $hBrush)
Attachments (0)
Change History (1)
comment:1 Changed 15 years ago by Jpm
- Milestone set to 3.3.7.0
- Owner set to Jpm
- Resolution set to Fixed
- Status changed from new to closed
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.
Note: See
TracTickets for help on using
tickets.
Fixed by revision [5779] in version: 3.3.7.0