1. This forum is in read-only mode.

A problem with Chilkat in Visual Basic

Discussion in 'Non-Emulation Help' started by yoshi2889, Oct 26, 2010.

  1. yoshi2889

    yoshi2889 Well-Known Member

    Hello.

    In my visual basic project (R4 Manager) I am using Chilkat to unzip ZIP files.

    I use this piece of code:
    Code:
            Dim zip As New Chilkat.Zip
            Dim success As Long
            success = zip.UnlockComponent("Anything for 30-day trial")
            If (success <> 1) Then
                MsgBox(zip.LastErrorText)
                Exit Sub
            End If
            success = zip.OpenZip("C:\Downloads\R4Original.zip")
            If (success <> 1) Then
                MsgBox(zip.LastErrorText)
                Exit Sub
            End If
            Dim unzipCount As Long
            unzipCount = zip.Unzip("C:/Downloads/R4Original")
            If (unzipCount < 0) Then
                MsgBox(zip.LastErrorText)
            End If
    And it keeps giving me this error at the "Dim zip As New Chilkat.Zip" part:
    "Zip" is ambiguous in namespace "Chilkat".

    Anybody know (and can teach me) an alternative way to unzip files, or, can explain me how to fix this?
     
  2. Loonylion

    Loonylion Administrator Staff Member

    you can't use zip as a name because there is already something named zip
     
  3. yoshi2889

    yoshi2889 Well-Known Member

    ...ok, gonna try that.

    Wasn't aware of that.
    Post Merge: [time]1288123191[/time]
    Still the same error when using zipfile as name.
     
  4. Loonylion

    Loonylion Administrator Staff Member

    then theres something named zipfile as well?
     
  5. yoshi2889

    yoshi2889 Well-Known Member

    Know any alternative ways, Loony?

    This method sucks like hell...
    Post Merge: [time]1288172933[/time]
    Nevermind found an alternative way.