Jose's Read Only Forum 2023

IT-Consultant: José Roca (PBWIN 10+/PBCC 6+) (Archive only) => Windows API Headers => Topic started by: José Roca on April 09, 2011, 01:05:05 PM

Title: zLib v. 1.2.5
Post by: José Roca on April 09, 2011, 01:05:05 PM
 
About zLib

zLib is a compression library written by Jean-Loup Gailly (compression) and Mark Adler (decompression).

Home Page: http://www.zlib.net/

The calling convention used in zlib1.dll is CDECL.

zLibWapi.dll is a library that merges the standard zLib library with the functions written with Gilles Volant to compress and uncompress .zip files using zLib. It uses the STDCALL calling convention.

Home Page: http://www.winimage.com/zLibDll/

The attached file contains my translation of the headers to PowerBASIC of both zLib and zLibWapi, as well as zLibWapi.dll. In addition, zLibWapi.inc also contains some wrapper functions to compress and uncompress strings and to add files to a .zip file.
Title: Re: zLib v. 1.2.5
Post by: Eros Olmi on March 08, 2016, 12:06:54 AM
Sorry to re-open this old post but maybe someone has already faced this problem.

I'm trying to extract file from password protected zip files.
I use UnzOpenCurrentFilePassword but for some reason it generated an error.
The same function is working fine if password is null

I read somewhere password must be CRC32 encrypted before passed to that function but didn't find any info on how to do.

Does someone had similar problems?
Thanks
Eros
Title: Re: zLib v. 1.2.5
Post by: Eros Olmi on March 08, 2016, 01:26:43 AM
I found this: http://stackoverflow.com/questions/6711173/how-to-use-unzopencurrentfilepassword
I suppose the only way is to re-compile C sources of zLibWapi.dll removing NOUNCRYPT
Title: Re: zLib v. 1.2.5
Post by: Eros Olmi on March 08, 2016, 01:36:12 AM
Problem solved.

For some reason attached zLibWapi.dll version 1.2.5 doesn't work with password protected files.
Instead version 1.2.3 downloadable from http://www.winimage.com/zLibDll/index.html seems working fine.