gnozal wrote:
I fixed a memory allocation issue, so maybe this is fixed.
Haven't changed anything here, I was trying to delete a file within MS office files (dotx, xlam, ppam) which seem to have been packed without any compression.
gnozal wrote:
I have uploaded a new version, it should work now with your code. You need to add a PureZIP_Archive_FileInfo() call before using myFileinfo\unCompressedSize though.
Oh, must have deleted the PureZIP_Archive_FileInfo() line in my last code example.

Your new version do show the same effects than before, I fear I must do something wrong. I use this small
zip file for the following code:
Code:
Archiv.s="Zip.zip"
Datei.s="Dir1\Text1.txt"
Global Buffer.s="Hallo"
Global Ok
#Banner="***Yippieh***"
If PureZIP_Archive_Read(Archiv)
myfileinfo.PureZIP_FileInfo
If PureZIP_Archive_Locate(Datei)=#UNZ_OK
PureZIP_Archive_FileInfo(@myFileinfo)
Buffer=Space(myFileinfo\unCompressedSize)
If PureZIP_Archive_ExtractMem(@Buffer,Len(Buffer))>0
f=FindString(Buffer,"Change")
If f
f=FindString(Buffer,"[",f)
e=FindString(Buffer,"]",f+1)
Debug "Old Text: "+Mid(Buffer,f+1,e-f-1)
If e
Debug "New Text: "+#Banner
Buffer=Left(Buffer,f)+#Banner+Mid(Buffer,e)
Ok=#True
EndIf
EndIf
EndIf
EndIf
PureZIP_Archive_Close()
EndIf
If Ok
PureZIP_Archive_Close()
Debug PureZIP_DeleteFile(Archiv,Datei)
If PureZIP_Archive_Create(Archiv,#APPEND_STATUS_ADDINZIP)
Debug PureZIP_Archive_CompressMem(Datei,@Buffer,Len(Buffer)-1)
PureZIP_Archive_Close()
EndIf
EndIf