Sample code for 30+ languages & platforms
Visual Basic 6.0 Requires Chilkat v11.0.0+

Transition from ZipEntry.NextEntry to ZipEntry.GetNext

Provides instructions for replacing deprecated NextEntry method calls with GetNext.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

'  ------------------------------------------------------------------------
'  The NextEntry method is deprecated.
'  See below or code showing how to rewrite using EntryAt/GetNext

Dim zip As New ChilkatZip

success = zip.OpenZip("qa_data/zips/xml_files.zip")
If (success <> 1) Then
    Debug.Print zip.LastErrorText
    Exit Sub
End If

Dim entry As ChilkatZipEntry
Set entry = zip.FirstEntry()
If (zip.LastMethodSuccess = 0) Then
    Debug.Print "This zip archive is empty."
    Exit Sub
End If

Dim finished As Long
finished = 0
Do While finished = 0

    If (entry.IsDirectory = 0) Then
        Debug.Print entry.FileName
    Else
        Debug.Print "(directory) " & entry.FileName
    End If

    Dim next As ChilkatZipEntry
    Set next = entry.NextEntry()
    If (entry.LastMethodSuccess = 0) Then
        finished = 1
    End If

    Set entry = next
Loop

zip.CloseZip 

Debug.Print "----"

'  ------------------------------------------------------------------------
'  Do the equivalent using EntryAt/GetNext.

success = zip.OpenZip("qa_data/zips/xml_files.zip")

Dim ze As New ChilkatZipEntry
success = zip.EntryAt(0,ze)

Dim entryValid As Long
entryValid = 1
Do While entryValid = 1

    If (ze.IsDirectory = 0) Then
        Debug.Print ze.FileName
    Else
        Debug.Print "(directory) " & ze.FileName
    End If

    entryValid = ze.GetNext()
Loop

zip.CloseZip