1

How unzip file using chilkat?
I have problem to openzip(filepath) using vb.net?

my code

Dim zip As New Chilkat.zip()
Dim success As Boolean
success = zip.Openzip(ZipTargetFile)
If (success <> True) Then
  MessageBox1("File can't open")
  Exit Sub
End If

How to open zip file using chilkat. can someone help me?

Landei
  • 54,104
  • 13
  • 100
  • 195

2 Answers2

0

Using Unzip instead of Openzip should work. Additionally, your code is way too complicated. It should be done as follows:

Dim zip As New Chilkat.Zip()
Dim success As Boolean = zip.Unzip(ZipTargetFile)

If Not success Then
    MessageBox1("File can't open")
    Exit Sub
End If
Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
  • i already done like that but i just give the same result.. here is my code
    – faizalSalleh Jun 30 '11 at 09:27
  • 1
    @user714435 Can you open the Zip file manually? Is it perhaps password encrypted? Alternatively perhaps the library simply cannot cope with this particular zip archive because it uses an algorithm not supported by the library. – Konrad Rudolph Jun 30 '11 at 09:31
0

In order to get this to work, I needed to use both the OpenZip and Unzip functions (plus CloseZip in order to archive the file after unzipping if not encapsulated in a using statement).

Zip zipHelper = new Zip();
zipHelper.OpenZip(fileInfo.FullName);
zipHelper.Unzip(fileInfo.DirectoryName);
zipHelper.CloseZip();
Kevin Pope
  • 2,964
  • 5
  • 32
  • 47