![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java JavaScript Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Visual FoxPro) Find a ZIP Entry by EntryID Using EntryByIdSee more Zip Examples This example demonstrates how to use the Each This is useful when:
The example:
Note: This example requires Chilkat v11.0.0 or greater.
LOCAL lnSuccess LOCAL loZip LOCAL loEntry LOCAL lnEntryId LOCAL loEntry2 lnSuccess = 0 lnSuccess = 0 * Open an existing ZIP archive. loZip = CreateObject('Chilkat.Zip') lnSuccess = loZip.OpenZip("example.zip") IF (lnSuccess = 0) THEN ? loZip.LastErrorText RELEASE loZip CANCEL ENDIF * Retrieve the first entry in the ZIP archive. loEntry = CreateObject('Chilkat.ZipEntry') lnSuccess = loZip.EntryAt(0,loEntry) IF (lnSuccess = 0) THEN ? loZip.LastErrorText RELEASE loZip RELEASE loEntry CANCEL ENDIF ? "Original entry:" ? " FileName: " + loEntry.FileName ? " EntryID: " + STR(loEntry.EntryID) ? "" * Save the EntryID for later use. lnEntryId = loEntry.EntryID * Create another ZipEntry object. loEntry2 = CreateObject('Chilkat.ZipEntry') * Retrieve the same entry using EntryById. lnSuccess = loZip.EntryById(lnEntryId,loEntry2) IF (lnSuccess = 0) THEN ? loZip.LastErrorText RELEASE loZip RELEASE loEntry RELEASE loEntry2 CANCEL ENDIF ? "Entry retrieved by EntryID:" ? " FileName: " + loEntry2.FileName ? " EntryID: " + STR(loEntry2.EntryID) ? "" * The filenames and EntryID values should match. loZip.CloseZip() ? "Done." RELEASE loZip RELEASE loEntry RELEASE loEntry2 |
||||
© 2000-2026 Chilkat Software, Inc. All Rights Reserved.