flat assembler
Message board for the users of flat assembler.

Index > Windows > Using zipfldr.dll for zipping/unzipping files?

Author
Thread Post new topic Reply to topic
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY
ZIPFLDR.DLL gives Windows XP the native ZIP support.
I'd like to know what are the functions inside it I can use to zip/unzip files. Does anyone know?
Post 27 Jan 2008, 01:08
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17669
Location: In your JS exploiting you and your system
revolution
IIRC zipfldr can unzip only.

zlib and 7zip are probably more useful, both are open source.
Post 27 Jan 2008, 04:31
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7797
Location: Kraków, Poland
Tomasz Grysztar
revolution wrote:
IIRC zipfldr can unzip only.

It can do both.

I found some interesting method here: http://www.autohotkey.com/forum/topic15135.html
Code:
//Create an empty zip file
byte[] emptyzip = new byte[]{80,75,5,6,0,0,0,0,0,
                  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

FileStream fs = File.Create(args[1]);
fs.Write(emptyzip, 0, emptyzip.Length);
fs.Flush();
fs.Close();
fs = null;

//Copy a folder and its contents into the newly created zip file
Shell32.ShellClass sc = new Shell32.ShellClass();
Shell32.Folder SrcFlder = sc.NameSpace(args[0]);
Shell32.Folder DestFlder = sc.NameSpace(args[1]);
Shell32.FolderItems items = SrcFlder.Items();
DestFlder.CopyHere(items, 20);    
Post 27 Jan 2008, 20:09
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17669
Location: In your JS exploiting you and your system
revolution
Is that really zipping? I've never seen that before. Looks a little bit like cheating though, where is the use of zipfldr there?
Post 27 Jan 2008, 20:29
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7797
Location: Kraków, Poland
Tomasz Grysztar
zipfldr.dll is used indirectly, as a shell extension, the same as when you just drag-and-drop the files into the .zip file on Windows system supporting the .zip folders (or when you use the "Send to"->"Compressed folder" option from the file context menu).
Post 27 Jan 2008, 20:31
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17669
Location: In your JS exploiting you and your system
revolution
It also assumes you are running explorer.exe as your shell.
Post 27 Jan 2008, 20:36
View user's profile Send private message Visit poster's website Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY
Any ASM or C example source code?
Post 12 Feb 2008, 01:00
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.