Dropping Like Files - Zipping Without Libraries on Windows

Published October 17, 2012
Advertisement
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
0 likes 3 comments

Comments

Ashaman73
[quote]You may also know that what it doesn't have, is a defined API so us normals can leverage it programmatically.[/quote]
Us normals use normally [url="http://www.zlib.net/"]zlib[/url].
October 18, 2012 06:04 AM
mixmaster
zlib is good :-)
October 18, 2012 02:26 PM
adeyblue
[quote name='Ashaman73' timestamp='1350540264']
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 [url="http://www.zlib.net/"]zlib[/url]. [/quote]

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.
October 18, 2012 08:16 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement