![]() |
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
(Lianja) 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.
llSuccess = .F. llSuccess = .F. // Open an existing ZIP archive. loZip = createobject("CkZip") llSuccess = loZip.OpenZip("example.zip") if (llSuccess = .F.) then ? loZip.LastErrorText release loZip return endif // Retrieve the first entry in the ZIP archive. loEntry = createobject("CkZipEntry") llSuccess = loZip.EntryAt(0,loEntry) if (llSuccess = .F.) then ? loZip.LastErrorText release loZip release loEntry return 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("CkZipEntry") // Retrieve the same entry using EntryById. llSuccess = loZip.EntryById(lnEntryId,loEntry2) if (llSuccess = .F.) then ? loZip.LastErrorText release loZip release loEntry release loEntry2 return 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.