Opened 2 years ago
Last modified 2 years ago
#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 , 2 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , 2 years ago
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 , 2 years ago
| 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