Sample code for 30+ languages & platforms
Visual FoxPro

Transition from Zip.GetEntryByIndex to Zip.EntryAt

Provides instructions for replacing deprecated GetEntryByIndex method calls with EntryAt.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loZip
LOCAL lnIndex
LOCAL loEntryObj
LOCAL loZe

lnSuccess = 0

loZip = CreateObject('Chilkat.Zip')

* ...
* ...
lnIndex = 15

* ------------------------------------------------------------------------
* The GetEntryByIndex method is deprecated:

loEntryObj = loZip.GetEntryByIndex(lnIndex)
IF (loZip.LastMethodSuccess = 0) THEN
    ? loZip.LastErrorText
    RELEASE loZip
    CANCEL
ENDIF

* ...
* ...

RELEASE loEntryObj

* ------------------------------------------------------------------------
* Do the equivalent using EntryAt.
* 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.EntryAt(lnIndex,loZe)
IF (lnSuccess = 0) THEN
    ? loZip.LastErrorText
    RELEASE loZip
    RELEASE loZe
    CANCEL
ENDIF

RELEASE loZip
RELEASE loZe