zip/unzip with the win32 api

Hi,

I'm looking for a call to the Win32 API to zip/unzip files.

I do not want to use a 3rd party implementation (no sharpziplib or the like) nor do I want to use the .NET implementations of deflate or GZip, neither of those suit my needs. I searched around on Pinvoke.net for the correct function(s) but was unable to find a suitable one.

Does anyone know if a function for this exists in the Win32 API? I know they do it someplace as in XP & Vista you can view compressed ZIP files as well as the Office 2007 files are really just zipped up containers (this is what I need it for actually). In C++ or C# would be great.

Any suggestions? Thanks!!
LVL 1
jgarraAsked:
Who is Participating?
 
maligerConnect With a Mentor Commented:
If you are using c# 3.0 you can use System.IO.Packaging classes (they are specifically made for zipped up containers of Office2007 files).
There are also Office file implemenations on top of this like http://www.codeplex.com/ExcelPackage.

In WinAPI I dont know about any direct ZIP api and I dont think there are such. There are LZ functions (LZCopy e.g.) but thats not exacly what you look for, I think.

The shell32 CopyHere hack presented on anarki link seems pretty hacky (but it can work!). It seems to be undocumented though.
0
 
Christopher MartinezCommented:
http://msdn.microsoft.com/en-us/magazine/cc164129.aspx
is this what you were looking for?
0
 
jgarraAuthor Commented:
Thanks but unfortunately that uses the above referenced SharpZip library which is not something I'm allowed to use for this project.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
anarki_jimbelCommented:
0
 
fridomCEO/ProgrammerCommented:
http://www.nih.at/libzip/

Regards
Friedrich
0
 
jgarraAuthor Commented:
Thanks for the tip! They (MS) have such a strange way of organizing some of the dotnet framework!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.