Solved

zip/unzip with the win32 api

Posted on 2008-06-24
6
7,514 Views
Last Modified: 2013-12-03
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!!
0
Comment
Question by:jgarra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 7

Expert Comment

by:Christopher Martinez
ID: 21860308
http://msdn.microsoft.com/en-us/magazine/cc164129.aspx
is this what you were looking for?
0
 
LVL 1

Author Comment

by:jgarra
ID: 21860341
Thanks but unfortunately that uses the above referenced SharpZip library which is not something I'm allowed to use for this project.
0
 
LVL 30

Expert Comment

by:anarki_jimbel
ID: 21860395
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
maliger earned 500 total points
ID: 21863825
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
 
LVL 24

Expert Comment

by:fridom
ID: 21863895
http://www.nih.at/libzip/

Regards
Friedrich
0
 
LVL 1

Author Closing Comment

by:jgarra
ID: 31470366
Thanks for the tip! They (MS) have such a strange way of organizing some of the dotnet framework!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question