zip SPAN

Post Reply
User avatar
Maverich
Posts: 31
Joined: Sun Oct 09, 2005 8:29 pm
Location: Prato, Italia

zip SPAN

Post 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
Riccardo
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

You must check if hbzip.lib contains any compiled PRG and if so, compile it with Harbour.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: zip SPAN

Post 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
User avatar
Maverich
Posts: 31
Joined: Sun Oct 09, 2005 8:29 pm
Location: Prato, Italia

Post 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
Riccardo
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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 ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Found! Simply replace Alert() with MsgInfo() and then it will work perfectly!

EMG
User avatar
Maverich
Posts: 31
Joined: Sun Oct 09, 2005 8:29 pm
Location: Prato, Italia

ok!

Post 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
Riccardo
Post Reply