How to unzip and zip using DLL?

xPass

All aboard the xPass Express!
Reaction score
26
Hi guys! Yes it's me again...

New question today:
"How to unzip and zip using DLLs?"

I'm basically making a Warcraft III Version Switcher (which you might know) and I have used before Ugge's WVS. I see that there is no need for the user to unzip the version's files and Ugge used an unzip and a zip dlls, but I don't see how does he use it.

You see, the version's files are all zipped and when unzipped, are used to overwrite the existing files (from what I can gather), but the problem is how do I unzip it and overwriting the files when I want it to self extract when a button is clicked?

If you ever have had a chance to use Ugge's wvs, you will know that when he made the tool this way that when a user clicks the version he/she want's to switch to, the files will automatically be unzipped and overwrites the existing files.

I know he uses the DLL, but the whole point is still back to this question:
How do I unzip (nevermind zip) a zipped archive using a DLL?

I know I'm very noob, so if you need to know, I'm using AHK (AutoHotkey, google it). :D I hope you can help me! Until then, HAVE A GOOD DAY :D
 

xPass

All aboard the xPass Express!
Reaction score
26
ahk, i don't know what language it's using, all i know is it uses notepad to code
 

MusicDemon

Cool Member
Reaction score
4
I think it's a simplefied Visual Basic/C# combination... If you're able to create a script that executes a executable, then you could use the .Net Framework and use this example.
 

xPass

All aboard the xPass Express!
Reaction score
26
I think it's a simplefied Visual Basic/C# combination... If you're able to create a script that executes a executable, then you could use the .Net Framework and use this example.

Err thanks, but I'm not really good in programming, so will you please simplify it for me pls thx :D
 

UndeadDragon

Super Moderator
Reaction score
447
I don't think you will be able to make what you want using that. Use a proper programming language, such as C# and use the .NET framework as MusicDemon said.
 

The Helper

Necromancy Power over 9000
Staff member
Reaction score
1,697
You have to call the functions that do that zipping and unzipping from the dll. You will do that in code. If you can find the code that actually does this in a working game your best chance would be try to modify that code to do what you want as it will be working. The dll cannot execute, it just has functions available that you can reference in your code.
 

xPass

All aboard the xPass Express!
Reaction score
26
Oh man! So I cannot unzip the files now can I? >.<

Edit:
Wait, there is this function:
Result := DllCall("[DllFile\]Function" [, Type1, Arg1, Type2, Arg2, "Cdecl ReturnType"])

from here:DllCall()

any ideas how to call the functions for unzipping?

Edit2:
Gosh I'm seriously frustrated for wasting so much time looking for the solution of unzipping without progress!

Okay, let's say it this way:
I need something (DLL or not) that can extract zipped archives!! Somebody help me please or I think I'm going crazy! :banghead:
 

UndeadDragon

Super Moderator
Reaction score
447
That DLL call would probably work, however a DLL is simply a file which contains functions which make life easier. I'm guessing you don't have a DLL whose purpose it to unzip files.

Unless you can find a DLL that does it for you, then you would have to create one yourself.
 

xPass

All aboard the xPass Express!
Reaction score
26
That DLL call would probably work, however a DLL is simply a file which contains functions which make life easier. I'm guessing you don't have a DLL whose purpose it to unzip files.

Unless you can find a DLL that does it for you, then you would have to create one yourself.

Wow, thanks! But since I do not have the knowledge of DLL , can you make one that can unzip files for me? or even better: TEACH ME :D Well, a guide can be useful...

Hmm... so what you basically mean is that AHK can call functions from ANY dlls?
 

UndeadDragon

Super Moderator
Reaction score
447
Here is some useful code on unzipping in the .NET framework. You could port this into a dll.
 

xPass

All aboard the xPass Express!
Reaction score
26
Wait, before I read, firstly thanks. Secondly, after I am done with the code, do I save it with .dll extension and put the icon?

Edit:
Err wait, how do I call these functions while using AHK?

Edit2:
OMG! I can't believe this! I don't understand it at all T_T I need some help here! Somebody make me an unzip DLL and tell me what to do for the dllcall() for your dll please! I'll give you credits in the program in the About button!!!!! PLEASE!!!!!!!!!!
 

UndeadDragon

Super Moderator
Reaction score
447
To create a dll from that code, you would need to use a program such as Visual C# and create a Dynamic Link Library file. Never done it before, but I'm presuming you can then just reference to it like a normal class file.
 

xPass

All aboard the xPass Express!
Reaction score
26
To create a dll from that code, you would need to use a program such as Visual C# and create a Dynamic Link Library file. Never done it before, but I'm presuming you can then just reference to it like a normal class file.

Lol, then I'm doomed :D The newest Visual C# don't work with Windows XP Service Pack 2, does it? Well, but I just don't understand all those reference guides... I am in need of someone who can write up an unzip-able dll file and can give me the code for calling the unzip function using AHK's dllcall() function. :(
 

Varine

And as the moon rises, we shall prepare for war
Reaction score
805
Then get an older version. I know 2010 works on 32-bit OS's (can't remember if there's separate 62 and 32 bit versions), I have it on a computer with XP. I have SP3 though.
 

xPass

All aboard the xPass Express!
Reaction score
26
Then get an older version. I know 2010 works on 32-bit OS's (can't remember if there's separate 62 and 32 bit versions), I have it on a computer with XP. I have SP3 though.

Yeah, a lot of programs are limited to SP2. Many works only on SP3 and above... By the way, what's 62 and 32 bit? I've been seeing it for ages yet can't find out what it means lol...
 

azareus

And you know it.
Reaction score
63
64 is the newest (best), with most computers coming with it today, though I would say 32 bit is still more common.
 

Varine

And as the moon rises, we shall prepare for war
Reaction score
805
32 bit systems are typically limited to 4 gigs of RAM. 64 allows for up to 128 gigs of RAM (Home Versions are only like 8 or 16 I think). That being said, there are VERY few things that I need upwards of 4 gigs for at this point, let alone 128, even in game development I rarely use that much. Things like giant ass workstations would use that.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top