CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: zip32.dll

  1. #1
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    27

    zip32.dll

    Hi,
    I'm trying to zip some files from my application.
    The problem is that I want to zip the files and to loose information about the their original paths.
    For zipping I'm using the zip32.dll and what I'm looking for is either how to do this or the Dll documentation.

    Thanks all
    Marrigon


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: zip32.dll

    You can do it using winzip

    'source = app.path & "source.exe"
    'target = app.path & "target.zip"
    'zip = true (compress)
    'zip = false(uncompress)



    Function winZipit(ByVal source As String, ByVal target As String, ByVal zip As Boolean)
    zipIT = App.Path & "winzip32 -a"
    unzipIT = App.Path & "winzip32 -e "


    If zip = True Then
    Shell (zipIT & target & source)
    Else: Shell (unzipIT & target & source)
    End If
    End Function


    Iouri Boutchkine
    iouri@hotsheet.com
    Iouri Boutchkine
    iouri@hotsheet.NOSPAM.com

  3. #3
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    27

    Re: zip32.dll

    Unfortunately I can't use winzip because it's not installed on the server on which my application have to run.


  4. #4
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: zip32.dll

    What about pkzip

    c = Shell("d:\temp\pkunzip.exe d:\temp\t001015.zip d:\temp", vbHide)


    Iouri Boutchkine
    iouri@hotsheet.com
    Iouri Boutchkine
    iouri@hotsheet.NOSPAM.com

  5. #5
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: zip32.dll

    <de-lurk>

    Or you could checkout my 'zip/unzip' classes at :

    http://www.codeguru.com/vb/articles/1854.shtml

    - these wrap up the zip32.dll and unzip32.dll components.

    </de-lurk>


    Chris Eastwood
    VBCodeLibrary - http://www.vbcodelibrary.com

  6. #6
    Join Date
    May 2006
    Posts
    2

    Re: zip32.dll

    Hi

    Any Idea why I get the message :

    "Winzip Parameter Validation Error"

    When I use the code below ?

    Regards



    'source = app.path & "source.exe"
    'target = app.path & "target.zip"
    'zip = true (compress)
    'zip = false(uncompress)



    Function winZipit(ByVal source As String, ByVal target As String, ByVal zip As Boolean)
    zipIT = App.Path & "winzip32 -a"
    unzipIT = App.Path & "winzip32 -e "


    If zip = True Then
    Shell (zipIT & target & source)
    Else: Shell (unzipIT & target & source)
    End If
    End Function

  7. #7
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: zip32.dll

    You are missing the \ in all your paths:

    Code:
    zipIT = App.Path & "\winzip32 -a"
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured