Page 1 of 1

zip SPAN

Posted: Tue Nov 01, 2005 6:53 pm
by Maverich
In preceding posts, Antonio said I should use the hbzip.lib found in xharbour.org to Zip files.
Ok, I've used it, but calling the function
HB_ZIPFILEBYPKSPAN
causes a FiveWin GPF.
I've tried that function in Xharbour console, it plays well. It seems an incompatibility with FWH.

Here's the code:

Code: Select all

#include "FiveWin.ch"

FUNCTION main()

  hb_setdiskzip( { | nDisk | Alert( "Please insert disk no " + Str( nDisk, 3 ) ) } )

  IF HB_ZIPFILEBYPKSPAN( "a:\TEST.ZIP", "TEST.PRG" )
    Alert( "File was successfully created" )
  ENDIF

  RETURN NIL
Any suggestion?
thanks

Re: zip SPAN

Posted: Wed Nov 02, 2005 1:03 pm
by Enrico Maria Giordano
I confirm the problem. Found no solution so far.

EMG

Posted: Wed Nov 02, 2005 5:13 pm
by Antonio Linares
You must check if hbzip.lib contains any compiled PRG and if so, compile it with Harbour.

Posted: Wed Nov 02, 2005 7:09 pm
by Enrico Maria Giordano
Why with Harbour? I used xHarbour for my tests.

EMG

Re: zip SPAN

Posted: Wed Nov 02, 2005 9:11 pm
by Richard Chidiak
Maverich wrote:In preceding posts, Antonio said I should use the hbzip.lib found in xharbour.org to Zip files.
Ok, I've used it, but calling the function
HB_ZIPFILEBYPKSPAN
causes a FiveWin GPF.
I've tried that function in Xharbour console, it plays well. It seems an incompatibility with FWH.

Here's the code:

Code: Select all

#include "FiveWin.ch"

FUNCTION main()

  hb_setdiskzip( { | nDisk | Alert( "Please insert disk no " + Str( nDisk, 3 ) ) } )

  IF HB_ZIPFILEBYPKSPAN( "a:\TEST.ZIP", "TEST.PRG" )
    Alert( "File was successfully created" )
  ENDIF

  RETURN NIL
Any suggestion?
thanks
Ricardo

Can you try with the complete set of parameters ? Something like the following ? lzipwithpath := .t.

lZipDone:= HB_ZIPFILEBYPKSPAN( cZip , aFiles , 9, { |cFile,npos| QOUT( cFile ) }, ;
.T.,, lZipWithPath, .F. )


Can't test it here, i have no floppy drive. as far as i can recall it was working OK

Richard

Posted: Thu Nov 03, 2005 4:15 pm
by Maverich
richard,

I simply used the code that comes with the xharbour documentation. ANY example that uses hb..SPAN causes a GPF.
If you consider that a ZIP file is often used for backup on removable drives (ZIP, flash disks, ecc.), it's a great problem.

I don't understand what Antonio said-look for prg inside the lib-how can i recompile the prgs if I don't have any source?

regards

Posted: Thu Nov 03, 2005 8:49 pm
by Antonio Linares
Riccardo,

I missunderstood you, I though you were using Harbour, instead of xharbour.

Please create a MAP file and search for the GPF address into the MAP file.

Don't you get a FWH MsgAlert() with the calls stack list ?

Posted: Thu Nov 03, 2005 11:18 pm
by Enrico Maria Giordano
Found! Simply replace Alert() with MsgInfo() and then it will work perfectly!

EMG

ok!

Posted: Tue Nov 08, 2005 7:30 am
by Maverich
ok, it plays.
But if there isn't a disk in the floppy, how to exit the function? I haven't found a valid solution.

regards