Custom Query


Show under each result:

Results (64 - 66 of 3856)

Ticket Resolution Summary Owner Reporter
#1092 Fixed _Timer_SetTimer, Kill datatype discrepancies Jpm Ascend4nt

The functions _Timer_SetTimer(), _Timer_KillTimer, and _Timer_KillAllTimers in <Timers.au3> on AutoIT 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

#1541 Fixed _WinAPI_FillRect not x64 safe Jpm Ascend4nt

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)
#1677 Fixed ContinueLoop multiple level unpredictable behavior Jpm Ascend4nt

Hi, I've recently had a WEIRD issue pop up in my code - I kept getting a "Variable used without being declared" error. It turns out the issue has to do with ContinueLoop on multiple levels (ContinueLoop #).

Since I removed the inner loop and forgot to remove the '2' from ContinueLoop, it was jumping to another loop. However, here's the funky thing - the OTHER loop was in another function! (in this case, the calling function).

I've successfully reproduced the issue here:

Func TestContinueLoopIssue($iValue)
	While 1
		If $iValue Then
			ContinueLoop 2

Func OuterFunc()
	Local $iVal=5
	While 1
		ConsoleWrite("OuterFunc $iVal="&$iVal&@CRLF)
		If $iVal>1000 Then ExitLoop


Output: OuterFunc $iVal=6 C:\testscript.au3 (12) : ==> Variable used without being declared.: $iVal+=1 ERROR ->05:51:17 AutoIT3.exe ended.rc:1

As you can see, it seems to 'continue' the loop in the calling function - but since the variable is local to that function, it will not recognize them, thus the crash.

Note: See TracQuery for help on using queries.