Results 1 to 8 of 8

Thread: [VB6] 7-zip support

  1. #1
    Junior Member
    Join Date
    May 11
    Posts
    18

    [VB6] 7-zip support

    Here is an open source project that provides support for 7-zip in your VB6 projects.

    https://github.com/wqweto/VszLib

    Using VszLib.dll + 7z.dll your applications can create and extract 7z, zip, tar.gz, tar.bz2 and many more compression formats. Latest versions of 7z format include LZMA2 method for faster multi-core compression.

    Post your comments and questions here.

    cheers,
    </wqw>
    p.s. @Moderators: Please remove original thread.

  2. #2
    Frenzied Member Bonnie West's Avatar
    Join Date
    Jun 12
    Location
    InIDE
    Posts
    1,627

    Thumbs up Re: [VB6] 7-zip support

    Excellent code! Thanks for making it Open-Source!

    BTW, are there plans to support Unicode?
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0

    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  3. #3
    Junior Member
    Join Date
    May 11
    Posts
    18

    Re: [VB6] 7-zip support

    @Bonnie West: You mean unicode API for file handling and for creating long path+filenames?

    Unicode support depends on archive entries handling by archive format. For instance original ZIP format does not support unicode file names.

    I'll think about it, probably will have to use conditional compilation to support non-unicode filenames on 9x OSes.

    cheers,
    </wqw>

  4. #4
    Frenzied Member Bonnie West's Avatar
    Join Date
    Jun 12
    Location
    InIDE
    Posts
    1,627

    Re: [VB6] 7-zip support

    @ wqweto

    Yes. Since your project deals primarily with adding support for the 7-Zip format for VB6, I thought, why not include Unicode-aware file handling as well? I've just tested the 7-Zip File Manager and it can deal with Unicode filenames pretty well. But of course, it's up to you if you want to implement it or not. Consider my 'request' as a suggestion only.
    Last edited by Bonnie West; Jul 10th, 2012 at 03:28 AM.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0

    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  5. #5
    Junior Member
    Join Date
    Aug 11
    Posts
    24

    Re: [VB6] 7-zip support

    Hello, thanks for your effort, I have searched for many months something like this.

    I have few questions:
    1. Does it work with zip\rar?
    2. How can you check, after extract proccess, if all files were extracted successfuly?

    Thanks again! and good job!

  6. #6
    Junior Member
    Join Date
    May 11
    Posts
    18

    Re: [VB6] 7-zip support

    Hi,

    1. 7z.dll can compress/decompress zip files and only decompress rar files. There is a smaller version (7za.dll) of the 7-zip library that handles only 7z format.

    2. Usually `Extract` method will return False. You can sink `Error` event too.

    cheers,
    </wqw>

  7. #7
    Junior Member
    Join Date
    Jun 05
    Posts
    17

    Re: [VB6] 7-zip support

    VszLib do not work when i compile the classes inside a normal EXE, the .7z file is smaller and corrupt
    but it works when inside the IDE or when compiled inside a DLL, strange
    Last edited by sergelac; Dec 12th, 2012 at 09:56 AM.

  8. #8
    Junior Member
    Join Date
    May 11
    Posts
    18

    Re: [VB6] 7-zip support

    @sergelac: Probably threading issues. 7-zip spawns threads and does not care to initialize COM on these but insists on doing I/O on the supplied callback interfaces.

    Never managed to make it stable in Standard Exe, so I'm using it as an ActiveX Dll in my apps. P-code compilation (always used in IDE) alleviates problems somehow but still is not production stable.

    cheers,
    </wqw>

Posting Permissions

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