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
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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