Jump to content

April 2017 »

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425 26 272829
30      
- - - - -

Dropping Like Files - Zipping Without Libraries on Windows


windows c++
4: Adsense

If you haven't been living under a rock (or in a non-Windows world) you'll know that since XP, Windows has had zip file extraction and creation. You may also know that what it doesn't have, is a defined API so us normals can leverage it programmatically. But there are ways and means.

Think about it, the usual way you'd interact with zip files is through the shell. You'd highlight a bunch a files and "Send To" a Compressed Folder or drag them into an existing folder and voila. There's obviously some code behind that's actually doing those things, and since you can do them from 'Open File' dialogs and the like, it can't be code within the Explorer executable.

You can search Google all you want, but you'll only find that MSDN isn't sandbagging and there are no directly exported functions to create zips. What you may find is that shell32 and friends do have functions and interfaces to duplicate the Shell's methods of dragging, dropping and sending to, so that seems a good lead to follow...

Continue reading on Just Let It Flow

Oct 18 2012 12:04 AM

You may also know that what it doesn't have, is a defined API so us normals can leverage it programmatically.

Us normals use normally zlib.
Oct 18 2012 08:26 AM
zlib is good :-)
Oct 18 2012 02:16 PM

You may also know that what it doesn't have, is a defined API so us normals can leverage it programmatically.
Us normals use normally zlib.


Haha, yeah I'm well aware of that. It's not such a good tool to show how to simulate dragging and dropping in Windows though. The zipping aspect is just a useful angle a) to base it on and b) fit it in with the 'unseen side of Windows' theme of my blog.

Note: GameDev.net moderates comments.