Opened on Dec 9, 2023 at 1:10:36 PM
Last modified on Jan 18, 2024 at 12:10:44 AM
#3982 closed Bug
_ClipPutFile should not free memory — at Version 3
| Reported by: | Nine | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.16.1 | Severity: | None |
| Keywords: | Cc: |
Description (last modified by )
As per discussion here and MSDN :
$aCall = DllCall("kernel32.dll", "ptr", "GlobalFree", "handle", $hGlobal) If (@error Or $aCall[0]) And Not $iError Then $iError = @error + 90 $iLastError = _WinAPI_GetLastError() EndIf
should be removed from the script.
Change History (3)
comment:1 by , on Jan 4, 2024 at 4:52:43 PM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , on Jan 4, 2024 at 9:04:20 PM
The function _ClipPutFile() uses SetClipboardData. MSDN state that if SetClipboardData succeeds, the system owns the object identified by the hMem parameter. The application may not write to or free the data once ownership has been transferred to the system, but it can lock and read from the data until the CloseClipboard function is called.
comment:3 by , on Jan 5, 2024 at 3:06:32 AM
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.

Hi,
I don't see any reason to change the UDF
The following script work fine