Opened 12 months ago
Last modified 10 months ago
#3982 closed Bug
_ClipPutFile should not free memory — at Version 3
Reported by: | Nine | Owned by: | Jpm |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.16.1 | Severity: | None |
Keywords: | Cc: |
Description (last modified by mLipok)
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 Changed 11 months ago by Jpm
- Owner set to Jpm
- Status changed from new to assigned
comment:2 Changed 11 months ago by anonymous
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 Changed 11 months ago by mLipok
- 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