Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (85 - 87 of 3827)

Ticket Resolution Summary Owner Reporter
#3815 No Bug Remark in help regarding return value of _ArrayDelete is wrong anonymous
Description

The "Remarks" section of the _ArrayDelete function contains the following text regarding the return value (see https://www.autoitscript.com/autoit3/docs/libfunctions/_ArrayDelete.htm): "[...] but the return value of the function (if successful) gives the new highest row index of the array." But this statement is not true. The return value is not the new highest row index, but the total number of rows. See also the following example.

#include <Array.au3>

Local $aArray[5] = [0, 1, 2, 3, 4]

ConsoleWrite("Number of array elements before deletion: " & UBound($aArray) & @CRLF)
ConsoleWrite("Return value of _ArrayDelete: " & _ArrayDelete($aArray, 2) & @CRLF)
ConsoleWrite("Number of array elements after deletion: " & UBound($aArray) & @CRLF)
#3814 Fixed _WinAPI_CreateFileMapping: $PAGE_xxx constants not defined Jpm matwachich@…
#3813 Completed _MemGlobalRealloc Jpm matwachich@…
Description

Everything is in the title: It seems that this functions is laking from the Memory standard UDF.

Here is an implementation:

Func _MemGlobalRealloc($hMemory, $iBytes, $iFlags = 0)
	Local $aResult = DllCall("kernel32.dll", "handle", "GlobalReAlloc", "handle", $hMemory, "uint_ptr", $iBytes, "uint", $iFlags)
	If @error Then Return SetError(@error, @extended, 0)
	Return $aResult[0]
EndFunc
Note: See TracQuery for help on using queries.