News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

zlib

Started by jj2007, July 09, 2012, 03:53:51 AM

Previous topic - Next topic

hfheatherfox07

#15
Hello,
I am not having any luck , what am I doing wrong?
Also when I DO NOT Leave 2nd and 3rd Parameters NULL I get it crashing
Do We need to add  ".IF eax==ZLE_EXTRACT_SUCCESS"
I have tried that too
Thank You ....

EDIT:
Posted updated Example.zip in my next Post
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

fearless

My bad, left an Addr instruction in where it wasnt needed for the 3rd param. Fingers crossed it works now - updated my previous post with the newer version. Let me know how it goes.

hfheatherfox07

Quote from: fearless on April 18, 2013, 07:45:48 PM
My bad, left an Addr instruction in where it wasnt needed for the 3rd param. Fingers crossed it works now - updated my previous post with the newer version. Let me know how it goes.

Hello , It works now with the 2nd and 3rd Parameters as NULL !
But It wont take a second and 3rd parameters...It crashes! I have tried different folder destinations and different extensions  :(

Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

hfheatherfox07

By the way . Still nice job getting zlib to work  :t
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

fearless

Thanks :D

Downloaded example. Will take a closer look tonight - just on break at work at the mo.

hfheatherfox07

Although this works just fine if you want to select a file to extract.....

I modified a CRC32 check tool that I have made , so this was so quick to do :biggrin:
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

fearless

Uploaded a newer version in other post above. Had a few spare mins at lunch, so spotted the problem with the path name, looking for \ or / at end of outputfolder specified. Was adding addr of outputfolder to esi, instead of length of output folder - silly mistake. I think it might be fixed now. Thanks for testing it. Let me know if anything else looks odd or if there are any other crashes etc. Cheers.

hfheatherfox07

Quote from: fearless on April 19, 2013, 12:51:56 AM
Uploaded a newer version in other post above. Had a few spare mins at lunch, so spotted the problem with the path name, looking for \ or / at end of outputfolder specified. Was adding addr of outputfolder to esi, instead of length of output folder - silly mistake. I think it might be fixed now. Thanks for testing it. Let me know if anything else looks odd or if there are any other crashes etc. Cheers.

:greenclp: :greenclp: :greenclp:

ALL works %100 Here
Also Here are the 2 attachments with the updated Libs
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

fearless

#23
Updated zlibextract to v1.1

- New ZL_SetProcessInfoCallback proc for user to define own callback function to receive info whilst listing files or extracting files, or just zip archive info. Reworked code to implement that function.
- Added zlibextract.chm to help document the functions and show some basic usage/examples. Most of the info is also in the zlibextract.inc file as well.
- ZL_Extract: added dwOptions param - used for extract, list, info mode. Trying to forward think about possible cmd line usage, passing -e, v, -n, -r, -whatever switches.
- ZL_Extract: added lpszExcludeFileSpec param - not currently implemented, so just pass NULL for the moment.
- Created a zlibextract logo - yay! lol.
- Updated project page on my website to add new lib and chm file for download.

Should be possible to get each file info (via user defined callback proc) and add to a listview if someone wanted to do that. And/or show progress bar whilst extracting. Fingers crossed it all works as planned. The user defined callback function will receive all error or status return codes (as defined in the zlibextract.inc file) via the dwStatus param. Use of the Zl_SetProcessInfoCallback is optional, without it, the lib should work as before if just extracting files.

Let me know if there are any bugs, or things i should add to it. Not sure how much i will continue to add to it, only time will tell ;)

Enjoy

hfheatherfox07

Hello,
I noticed no zlibextract.asm or zlibextract_build.bat with this version  8)
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

fearless

Few changes to make, and test - noticed two issues.

- Filling in szFullFilename in listmode was based on lpszOutputFile param, when it should just show the internal path/name stored in zip
- Some archives with relative paths and stored as empty folder (not a file) where being passed back to the callback proc in my example.

Once i fix those up ill post up the new lib with the .asm and build. And hopefully ill post up an example prog as well with a listview being filled, and allow user to extract selected file in listview (or all files)

fearless

#26
Fixed the two issues i had - i hope. Included source and build batch file.

Also made a simple gui  - winzip like clone. Works for listing contents of zip files. Basic prog to show some usage. Left out the extract of files for the mo - might add it in later, or maybe ill leave it for someone who wants to make a winzip clone. Either way its there as a simple example.

Enjoy.

Update: fixed chm not displaying functions correctly, reuploaded zlibextract_1.1.zip to add the correct chm file.

ragdog

Nice thank you :t

dedndave

yes - nice work fearless   :t

i wonder if we could use the other functions in zlib ?

fearless

I think (and hope) that ive managed to compile an updated zlib v1.2.8 static library.

Ive created a simple radasm project that only calls zlibversion. If anyone has time to spare, could you download and compile it to see if it links properly.

I cant be 100% certain that my environment is not pulling in other references for other libs and whatnot, so just want to make sure it does work on other peoples computers.

Ive re-compiled my zlibextract library with the updated static version and ran the gui example listed in one of the above posts, and it seems to work fine. So fingers crossed.