Welcome to the Xceed Community | Help
Community Search  
More Search Options

How to test a zip file using API

Sort Posts: Previous Next
  •  02-17-2006, 7:53 AM Post no. 5600

    How to test a zip file using API

    Hi all,

    Does anyone have a working example on how to test a zip file using API?

    I am using XzTestZipFile function but it does not work.

    Thank you all,
    Date

    Programming with: Visual Basic 6, Xceed Compression Library 6.0, using API Calls.
  •  10-15-2009, 12:52 PM Post no. 24521 in reply to 5600

    Re: How to test a zip file using API

    To test the validity of a zip archive using the Xceed Zip compression library, you should use the TestZipFile method as explained in the online documentation available at the page:

    http://doc.xceedsoft.com/products/Xceedzip/TestZipFile_method.html.

    Find next an example code on how to implement in VB:

    Sub Command1_Click()

       Dim ResultCode As xcdError 

       Call XceedZip1.License( "your license key" )

       ' Set the name and path of the zip file to test

       XceedZip1.ZipFilename = "c:\test\zip.zip" 

       ' Start testing the file (we use True here so that we also test the actual compressed data, not just the zip file's structure)

       ResultCode = XceedZip1.TestZipFile(True) 

       ' Check the return value 

       If ResultCode <> xerSuccess Then

          MsgBox "Unsuccessful. Error #" & Str(ResultCode) & " occurred. " & "Description: " & _

                 XceedZip1.GetErrorDescription(xvtError, ResultCode)

       Else

          MsgBox "The tested zip file is completely error-free."

       End If

    End Sub

     


    Xceed - Software Developer and Technical Support
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.