Modify ↓
Opened 16 years ago
Closed 16 years ago
#1541 closed Bug (Fixed)
_WinAPI_FillRect not x64 safe
| Reported by: | Ascend4nt | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| 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 by , 16 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Fixed by revision [5779] in version: 3.3.7.0