Unzip a zip file query
hi,
i am writing a windows app, coding in C for Win32, and need to extract a particular file from within a zip file.
is there a way to do this programatically? i could not find an api for doing the same in MSDN
i am using MS VC++ .Net 2003
thanks for any tips you can provide
i know you can do it in .Net 3.0 using the support for packaging in system.IO.Packaging namespace(Windowbase.dll), precisely ZipPackage class.
However, you have to install the .NET 3.0 framework. hope this helped.
Yes i guess, but anyway .Net doesn't support Zip Packaging before .net 3.0 (there was only support for GZIP), so there will be no other solution. I don't know if you can work around by installing only the needed DLL (windowbase.dll), it is only 1.1 MB, worth tr it?
Don't worry about installing the .NET 3.0, it just add and doesn't modify, so everything will work on it.
Hope this help
bruno_1 wrote: |
Yes i guess, but anyway .Net doesn't support Zip Packaging before .net 3.0 (there was only support for GZIP), so there will be no other solution. I don't know if you can work around by installing only the needed DLL (windowbase.dll), it is only 1.1 MB, worth tr it? Don't worry about installing the .NET 3.0, it just add and doesn't modify, so everything will work on it. Hope this help
| |
Thanks to bruno_1 for replying to my original question.
I later thought that I would not want to 'force' and end user to have .net framework 3.0. So, for anyone else who wants not to use .net framework, have a look at zlib ( http://www.zlib.net/ ).
- vc programmer
Your customers will end up with the .NET 3.0 runtime at one point or another anyway, so why bother dancing around it? (Think Vista). When I started working on my .NET 2.0 project, there a lot of hesitant people. Oh well, now that the project is finally done, .NET 2.0 is no big deal. But if you insist on not having users get .NET 3.0 runtime, then check out the Visual J# solution - you can use vjslib in C# or C++ or any place else you want. Sorry, I don't remember the link for the example.