(Visual FoxPro) Open and Unzip an AES Encrypted Zip
Open and unzip an AES encrypted Zip.
LOCAL loZip
LOCAL lnSuccess
LOCAL lnUnzipCount
* This example requires the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Zip')
loZip = CreateObject('Chilkat.Zip')
lnSuccess = loZip.OpenZip("/myZips/aes.zip")
IF (lnSuccess <> 1) THEN
? loZip.LastErrorText
RELEASE loZip
CANCEL
ENDIF
* Set the password needed to unzip.
* This password must match the password used when the zip
* was created.
loZip.DecryptPassword = "myPassword"
* Unzip the .zip into /unzipDir.
* Returns the number of files and directories unzipped.
lnUnzipCount = loZip.Unzip("/unzipDir/")
IF (lnUnzipCount < 0) THEN
? loZip.LastErrorText
ELSE
? "Success!"
ENDIF
RELEASE loZip
|