Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from Zip.GetEntryByName to Zip.EntryOf
Provides instructions for replacing deprecated GetEntryByName method calls with EntryOf.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oZip
LOCAL cPathInZip
LOCAL oEntryObj
LOCAL oZe
nSuccess := 0
oZip := CreateObject("Chilkat.Zip")
// ...
// ...
cPathInZip := "example.txt"
// ------------------------------------------------------------------------
// The GetEntryByName method is deprecated:
oEntryObj := oZip:GetEntryByName(cPathInZip)
IF (oZip:LastMethodSuccess == 0)
? oZip:LastErrorText
oZip:destroy()
RETURN
ENDIF
// ...
// ...
oEntryObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using EntryOf.
// Your application creates a new, empty ZipEntry object which is passed
// in the last argument and filled upon success.
oZe := CreateObject("Chilkat.ZipEntry")
nSuccess := oZip:EntryOf(cPathInZip, oZe)
IF (nSuccess == 0)
? oZip:LastErrorText
oZip:destroy()
oZe:destroy()
RETURN
ENDIF
oZip:destroy()
oZe:destroy()