Modify

#1092 closed Bug (Fixed)

_Timer_SetTimer, Kill datatype discrepancies

Reported by: Ascend4nt Owned by: Jpm
Milestone: 3.3.1.2 Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc:

Description

The functions _Timer_SetTimer(), _Timer_KillTimer, and _Timer_KillAllTimers in <Timers.au3> on AutoIT 3.3.0.0 have a few data type discrepancies that might cause it to fail on x64 (haven't tested it myself but I assume you'd at least want the correct size variables)
Specifically the 'int' vs 'uint_ptr' is the most important (the other corrections are just to make the value unsigned (all per MSDN notes).

Here's the problems for SetTimer:

$hCallBack = DllCallbackRegister($sTimerFunc, "none", "hwnd;int;int;dword")

should be:

$hCallBack = DllCallbackRegister($sTimerFunc, "none", "hwnd;uint;uint_ptr;dword")

Also, there's two DllCall lines, I think they are identical, which read as:

$iResult = DllCall("user32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", $iTimerID, "int", $iElapse, "ptr", $pTimerFunc)

They should be:

$iResult = DllCall("user32.dll", "uint_ptr", "SetTimer", "hwnd", $hWnd, "uint_ptr", $iTimerID, "uint", $iElapse, "ptr", $pTimerFunc)

For the 'KillTimer' and 'KillAllTimers' functions, the DLLCalls (multiple ones) are setup like this:

$iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $_Timers_aTimerIDs[$x][1])

But the calls should be:

$iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "uint_ptr", $_Timers_aTimerIDs[$x][1])

That's all, thanks

Attachments (0)

Change History (3)

comment:1 by Valik, on Jul 27, 2009 at 10:25:36 PM

Have you checked the beta version? Don't report bugs against 3.3.0.0 because it may be fixed in the beta.

comment:2 by Ascend4nt, on Jul 28, 2009 at 4:58:38 AM

yup, just checked - the type definitions are wrong in the Beta too

comment:3 by Jpm, on Jul 28, 2009 at 5:07:11 PM

Milestone: 3.3.1.2
Owner: set to Jpm
Resolution: Fixed
Status: newclosed

Fixed in version: 3.3.1.2

Modify Ticket

Action
as closed The owner will remain Jpm.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.