Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unzip/restore with vfpcompression.fll
Message
From
01/06/2008 00:33:23
Chris Sund
Silhouette Solutions
Utah, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Unzip/restore with vfpcompression.fll
Miscellaneous
Thread ID:
01320805
Message ID:
01320805
Views:
169
Hello Everyone,

I am using the vfpcompression.fll to create zip backups of my data. This all works great. I'm trying to use some example code from the sweetpotato website to create a restore routine. I can get the restore to work, but I want to know if there is a way to hook a progress bar into the unzip routine, and if there is a way to speed it up. Currently the zip routine takes about 3 seconds. The unzip routine takes several minutes.

Here's the code I'm using. I'm just not sure how I would hook something into the UnzipQuick routine, or if there's a better way to do it.

Thanks!
SET LIBRARY TO LOCFILE("vfpcompression.fll")
m.lcAppPath = ADDBS(JUSTPATH(SYS(16,0)))

SET DEFAULT TO (m.lcAppPath)

ZipCallback("MyCallback()") && Start Event Handling - Any Function/Procedure/Method (in scope of course)

?UnzipQuick("C:\sps.zip", "C:\tlp") && unzip contents of Test.zip to C:\

ZipCallback("") && Stop Event Handling
SET LIBRARY TO

*****************************
FUNCTION MyCallback()
*****************************
    *!* Variables below are created on the fly
    *!* by the FLL when the ZipCallback feature is used
    
    *!* Depends on the value of nZipEvent
    ?cZipObjectName && Name of Zip, File, or Folder being processed
    
    *!* Events that fire MyCallback
    *!* 0 = Open Zip
    *!* 1 = Start Zip/Unzip of File
    *!* 2 = Read/Write File (nZipBytes will contain value of bytes read for event)
    *!* 3 - End Zip/Unzip of File
    *!* 4 - Folder Opened
    *!* 5 - Close Zip
    ?nZipEvent
    
    *!* Number of Bytes read (Event 3)
    ?nZipBytes

ENDFUNC
Next
Reply
Map
View

Click here to load this message in the networking platform