Sample code for 30+ languages & platforms
Visual FoxPro

Transition from Zip.GetEntryByName to Zip.EntryOf

Provides instructions for replacing deprecated GetEntryByName method calls with EntryOf.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loZip
LOCAL lcPathInZip
LOCAL loEntryObj
LOCAL loZe

lnSuccess = 0

loZip = CreateObject('Chilkat.Zip')

* ...
* ...
lcPathInZip = "example.txt"

* ------------------------------------------------------------------------
* The GetEntryByName method is deprecated:

loEntryObj = loZip.GetEntryByName(lcPathInZip)
IF (loZip.LastMethodSuccess = 0) THEN
    ? loZip.LastErrorText
    RELEASE loZip
    CANCEL
ENDIF

* ...
* ...

RELEASE loEntryObj

* ------------------------------------------------------------------------
* Do the equivalent using EntryOf.
* Your application creates a new, empty ZipEntry object which is passed 
* in the last argument and filled upon success.

loZe = CreateObject('Chilkat.ZipEntry')
lnSuccess = loZip.EntryOf(lcPathInZip,loZe)
IF (lnSuccess = 0) THEN
    ? loZip.LastErrorText
    RELEASE loZip
    RELEASE loZe
    CANCEL
ENDIF

RELEASE loZip
RELEASE loZe