﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3619	Return value of _WinAPI_LocalFree() is not consistent with what the documentation says	tukangusil7@…	Jpm	"'''Return Value according to the documentation'''
Success: True 
Failure: False, call _WinAPI_GetLastError() to ...

'''In WinAPIMem.au3'''

{{{
Func _WinAPI_LocalFree($hMemory)
  Local $aResult = DllCall(""kernel32.dll"", ""handle"", ""LocalFree"", ""handle"", $hMemory)
  If @error Then Return SetError(@error, @extended, False)

  Return $aResult[0]
EndFunc   ;==>_WinAPI_LocalFree
}}}

If the error is caused by the DllCall(), the documentation is correct.

However, the return value of LocalFree() itself according to MSDN is:
- If the function succeeds, the return value is NULL.
- If the function fails, the return value is equal to a handle to the local memory object. To get extended error information, call GetLastError().

Thus, if LocalFree() returns 0 (which means successful), _WinAPI_LocalFree() returns False (which means failed)."	Bug	closed	3.3.15.1	Standard UDFs	3.3.14.5	None	Fixed	LocalFree _WinAPI_LocalFree	
