![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java 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
(DataFlex) Transition from Zip.GetEntryByName to Zip.EntryOfProvides instructions for replacing deprecated GetEntryByName method calls with EntryOf. Note: This example requires Chilkat v11.0.0 or greater.
Use ChilkatAx-win32.pkg Procedure Test Handle hoZip String sPathInZip Variant vEntryObj Handle hoEntryObj Variant vZe Handle hoZe Boolean iSuccess String sTemp1 Boolean bTemp1 Get Create (RefClass(cComChilkatZip)) To hoZip If (Not(IsComObjectCreated(hoZip))) Begin Send CreateComObject of hoZip End // ... // ... Move "example.txt" To sPathInZip // ------------------------------------------------------------------------ // The GetEntryByName method is deprecated: Get ComGetEntryByName Of hoZip sPathInZip To vEntryObj If (IsComObject(vEntryObj)) Begin Get Create (RefClass(cComChilkatZipEntry)) To hoEntryObj Set pvComObject Of hoEntryObj To vEntryObj End Get ComLastMethodSuccess Of hoZip To bTemp1 If (bTemp1 = False) Begin Get ComLastErrorText Of hoZip To sTemp1 Showln sTemp1 Procedure_Return End // ... // ... Send Destroy of hoEntryObj // ------------------------------------------------------------------------ // Do the equivalent using EntryOf. // Your application creates a new, empty ZipEntry object which is passed // in the last argument and filled upon success. Get Create (RefClass(cComChilkatZipEntry)) To hoZe If (Not(IsComObjectCreated(hoZe))) Begin Send CreateComObject of hoZe End Get pvComObject of hoZe to vZe Get ComEntryOf Of hoZip sPathInZip vZe To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoZip To sTemp1 Showln sTemp1 Procedure_Return End End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.