Re: CAB format

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




You create a console application (in C++), and then ask (in a VB group!)
why it
creates a console???
--

:) Yes, I think I might have worked that out. I didn't
realize there was a difference between a "Win32
Console Applcation" and a "Win32 Application".

It's a VC++ issue but I've been working on a VB
solution. I think I have it now. MS has a sample package
called "cabview" that provides barebones C++
code for using cabinet.dll to extract from CABs.
It was fairly simple to adapt that code. Ironically,
though, I only came across it after 3 days of searching,
and it was on a Chinese download site!

It may be that no one else really needs this, but
I'll be happy to share the code samples if anyone does.
What I came up with was a small commandline
EXE that extracts all of the CAB contents to curdir.
(My C++ is not good enough to do much more than that.)

It seems that the CDECL functions in cabinet.dll
are really the only realistic way to extract. I had fairly
good luck with parsing the actual binary structure of
CABs, which turned out not to be so hard. But the trouble
with that was that there are several variations on the
compression method that can be used. So I could
extract the compressed file streams but then I'd need
several decompression routines (and their support
files) to deal with the next step. With cabinet.dll the
compression type can be ignored.

For anyone who's interested, *don't waste your time
with SetupIterateCabinet*. It works beautifully, but
only on CABs compressed with MSZIP. On others
the extraction callback returns error 13 on the first file.


.



Relevant Pages

  • Re: Looking for a copy of TDLs ZASM
    ... HOW do I get the files out of the .lbr File ... Some archives are self extracting, ... One very good library extract program is called lbrext.com. ... current compression standards. ...
    (comp.os.cpm)
  • Re: uncompress files/or folders
    ... When you open a compressed folder, the 'Extract all files' command appears in the Folder Tasks list. ... If you're relying on compression to have enough free disk space, what you really need is a new hard disk. ...
    (microsoft.public.windowsxp.help_and_support)
  • BitZipper Archive Extraction Directory traversal
    ... BitZipper Archive Extraction Directory traversal ... compression and encoding formats with superior ... or TAR or ZIP or TAR.GZ or GZ ... Do not extract untrusted RAR and TAR and JAR and GZ ...
    (Bugtraq)
  • Re: NP-Complete Definition
    ... to extract the ith item from the compressed bits in polynomial time. ... Onumbers,so by not passing the list of numbers explicitely (which ... to make sure that you can achieve your claimed exponential compression ratio ...
    (comp.theory)
  • Re: unzip many files
    ... w/o extracting the files onto disk somewhere? ... I Win32, when you click on an archive, it opens the archive in a window ... but it does not actually extract anything until ... These will show you the contents of archives for free using ...
    (comp.sys.mac.system)