FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour HB_ZipFile - Password problem - SOLVED
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
HB_ZipFile - Password problem - SOLVED
Posted: Mon Sep 30, 2024 11:46 AM

HB_ZipFile (with password), it worked in version 16.08.

In version 24.04, if you enter a password, it doesn't work.

If you add a password, compression does not work.

the problem also happens in prg: c:\fwh\samples\testzip.prg

include "fivewin.ch"

function main()

local aFiles:={}, cFilZip

AADD(aFiles, "c:\fwh\samples\testdlg.prg")

cFilZip := "c:\fwh\samples\test.zip"

ferase(cFilZip)

lOK := HB_ZipFile( cFilZip, aFiles, 9,,,'695',.F. ) //695 is a password

? lOK

return

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 12:23 PM

Your sample works fine here.

Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 12:27 PM

Sr. Enrico,

in version (16.08 and 18.02) it also works normally here.

the problem is happening in version 24.04.

all versions with the same harbour version

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 12:38 PM

I'm using latest FWH and your sample works fine. And please note that HB_ZIPFILE() is a [x]Harbour function, not a FWH function.

Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 12:41 PM

Yes, I understand that it is a function of harbour. But, it is happening here.

I have a suspicion, regarding the LIBS orders in buildh.bat

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 01:03 PM
This is the order I'm using, but it should not make any difference (please note that I'm also using MiniZIP, but it doesn't matter):
Code (fw): Select all Collapse
hbvm +
hbcommon +
hbrtl +
hbmacro +
gtwin +
hbrdd +
hbsix +
rddntx +
rddfpt +
xhb +
hbct +
hbwin +
hbpcre +
hbziparc +
hbmzip +
minizip +
hbzlib +
rddcdx +
gtgui +
hbtip +
hbcplr +
hbpp +
hbcpage +
hbcurl +
libcurl
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 01:12 PM

Mr. Enrico, it's the same, even using minizip.lib. If just for testing, I comment out minizip.lib, it generates several errors.

The strangest thing is that if you remove the password, it works.

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 01:48 PM
Bira, Tente assim:
Code (fw): Select all Collapse
   HB_ZIPFILE( cFilZip, aFiles, 9,,.T., "695", .F., .F., )
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 01:51 PM
MGA wrote:Mr. Enrico, it's the same, even using minizip.lib. If just for testing, I comment out minizip.lib, it generates several errors.

The strangest thing is that if you remove the password, it works.
Probably you are not using the latest Harbour build:

https://github.com/FiveTechSoft/harbour_and_xharbour_builds/blob/master/harbour_bcc770_32_20240814.zip
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 06:18 PM

João,

HB_ZIPFILE( cFilZip, aFiles, 9,,.T., "695", .F., .F., )

tambem não funciona!

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 06:33 PM

Sr. Enrico,

I downloaded harbour(r2407221137), as I don't have BCC770, I compiled it with my BCC7.3. And the problem persists. That is, if you put a password, it doesn't compress the files, if you remove the password it compresses them.

I don't know how, but it seems to have something to do with the FIVEWIN version.

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 06:56 PM
Bira, PBACKUP.prg para HARBOUR. Compile, informe a contrasenha e me diga se funciona com a sua versão. Com FWH1905, funciona perfeito. Abra o .ZIP no WINIRAR.exe, ok?

https://imgur.com/dQ9ti47



Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 06:57 PM
Bira, download completo do meu MegaUpload, aqui:

https://mega.nz/file/II9GTBLZ#h4aAe8VgDqbICFsLRu8lXI5xLH-YbTq3Z3ekImYvOFg

Veja: HARB.BAT y HARB.LNK -> Modifique os PATHS para a sua versão(bugada) do Fivewin, ok?

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 07:11 PM

jOAO, nas minhas versoes anteriores, 16.04 E 18.02 funciona normal, nao esta funcionando na 24.04

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_ZipFile - Password problem
Posted: Mon Sep 30, 2024 07:15 PM
MGA wrote:Sr. Enrico,

I downloaded harbour(r2407221137), as I don't have BCC770, I compiled it with my BCC7.3. And the problem persists. That is, if you put a password, it doesn't compress the files, if you remove the password it compresses them.


I don't know how, but it seems to have something to do with the FIVEWIN version.
You have to use BCC 7.70, not BCC 7.30.