Opened 14 years ago

Closed 14 years ago

#1541 closed Bug (Fixed)

_WinAPI_FillRect not x64 safe

Reported by: Ascend4nt Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity: None
Keywords: _WinAPI_FillRect UDF Cc:


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)
	$aResult = DllCall("user32.dll", "int", "FillRect", "handle", $hDC, "ptr", $ptrRect, "dword", $hBrush)

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 14 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5779] in version:

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.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.