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,701
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
808
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
808
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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top