A simple application to test the validation of .zip files

Started by Relvinian, November 15, 2006, 07:34:23 PM

Previous topic - Next topic

Relvinian

I've been slowly working on my ZIP decompression engine along with putting *all* my assembly routines into a "run-time" DLL file that all applications could use.

Attached is the .DLL file along with a simple 100% Win32 gui application to test .ZIP files for validity with my library.  Check it out and let me know what you think.  I have also included a .map file in the attachment so if the program does crash, you can send me the exception information and I can fix it.

Once I have moved all my ASM library functions into the .DLL file, I'll post the source for you all to have fun with. Of course, if you would like to see some examples of the source; as is; let me know and I can post a few files for viewing pleasure.

I have included the source to the .EXE but until you have all my library code, it won't compile. This is so you can see how easy the ZIP decompression routines are to use.

Known bug with the test application..If you press the close button "x" on the progress dialog, it will close but not stop until it has completed...The cancel but will abort it immediately though.

Relvinian

PS - Oh, one addition note of interested...The first column value is from this listing:

; compression and decompression error codes
zip_noError           equ 0 ; no error
zip_generic           equ 1 ; unknown error

; zip decompression specific error codes
zipd_streamEnd        equ 100 ; zlib library errors
zipd_NeedDict         equ 101
zipd_ErrNumber        equ 102
zipd_StreamError      equ 103
zipd_DataError        equ 104
zipd_MemError         equ 105 ; internal memory allocation error
zipd_BufError         equ 106
zipd_VersionError     equ 107
zipd_NoCentralDir     equ 108
zipd_BadZipFile       equ 109 ; damaged zip file
zipd_BadCrc           equ 110 ; crc mismatched
zipd_TooLongFileName  equ 111 ; added file name is too long
zipd_BadPassword      equ 112 ; incorrect password set for the file being decrypted
zipd_EntryNotFound    equ 113 ; the central directory was not found in the archive
zipd_DirWithSize      equ 114 ; during testing: found the directory with the size greater than 0
zipd_DirEmpty         equ 115 ; empty zip file

; zip compression specific error codes
zipc_project_still_to_be_completed  equ 200

; library specific error codes
zipl_ParamInvalid       equ 300 ; parameters invalid
zipl_FileContentErr     equ 301 ; failed to open or read a file
zipl_ZipFileNotOpened   equ 302 ; Must open a .zip file first
zipl_ZipEntryAlreadyOpened equ 303 ; must close prior opened entry
zipl_ZipWrongEngine     equ 304 ; HZIP is wrong engine (either decomp or comp and should be other)
zipl_ZipIdxOutOfBounds  equ 305 ; index parameter is out of bounds.
zipl_ZipEntryNotOpened  equ 306 ; must open a entry first.


PPS - The value 108 and 301 are currently reversed for the status result.  Known bug. :-)

[attachment deleted by admin]