From the SQLite table, I get the address and size of the blob in a SQLite record. I can use successfully these two fields to create a temporary file and load it to the Clipboard using the WinClip.Load() method.
Code: Select all
; intAddr: address of a SQLite Blob field containing data captured earlier from the Clipboard
; intSize: size of the same SQLite Blob field
hFileData := FileOpen(strFilePath, "w")
VarSetCapacity(oBlob, intSize)
DllCall("Kernel32.dll\RtlMoveMemory", "Ptr", &oBlob, "Ptr", intAddr, "Ptr", intSize)
hFileData.RawWrite(&oBlob, intSize)
hFileData.Close()
WinClip.Load(strFilePath) ; this is working
Code: Select all
; intAddr: address of a SQLite Blob field containing data captured earlier from the Clipboard
; intSize: size of the same SQLite Blob field
; prepare the Blob for WinClipJL.SetData()
VarSetCapacity(oBlob, intSize)
DllCall("Kernel32.dll\RtlMoveMemory", "Ptr", &oBlob, "Ptr", intAddr, "Ptr", intSize)
; call WinClip extended method SetData
intSetSize := WinClipJL.SetData(oBlob, intSize) ; this is NOT working
Code: Select all
class WinClipJL extends WinClip
{
SetData( dataBuff, dataSize )
; adaped from the WinClip.Load() method
{
if !( size := this._toclipboard( dataBuff, dataSize ) )
return 0
return size
}
}