Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DynaZip zip file protection
Message
 
 
À
10/04/2003 01:24:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00775513
Message ID:
00776045
Vues:
11
>Hi Mark. I am using V4 and the dll's. I did not see any compelling reason to go to 5 for my purposes.

Same here. Right off, I do not see anyway to determine this unless you try to extract a single file without setting a password. If that is false, try your password. The following code should work, just change "your_pwd" and "your_path" in the code.
o = NEWOBJECT('DynaZip', 'DynaZip.fxp')
o.lUNZ_NoMsgs = .t.
o.cUNZ_ZipFile = GETFILE('zip')
o.GetAllZipFileInfo()
if not empty(o.aZI_FileInfo(1))
   o.cUNZ_FileSpec = o.aZI_FileInfo(1)
endif
o.cUNZ_Destination = GETENV('temp')
if o.UNZExtract()
   *!* password not required. abort.
   erase ADDBS(GETENV('temp')) + o.aZI_fileinfo(1)
   return .f.
endif
o.cUNZ_CryptCode = 'your_pwd'
o.lUNZ_CryptFlag = .t.
if not o.UNZExtract()
   *!* file encrypted with password other than yours. abort.
   return .f.
endif
erase ADDBS(GETENV('temp')) + o.aZI_FileInfo(1)
o.cUNZ_Destination = 'your_path'
o.cUNZ_FileSpec = '*.*'
o.UNZExtract()
o.Release()
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform