Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
MFC Unencrypt Zip (w/ Unicode CString)Downloads: MS Windows Visual C/C++ Libraries Linux/CentOS C/C++ Libraries MAC OS X C/C++ Libraries Solaris C/C++ Libraries C++ Builder Libraries Visual C++ 8.0 MFC Unicode example program using CString's demonstrating how to open an AES encrypted .zip, remove the encryption, and save as an unencrypted zip. // Visual C++ MFC example program showing how // to open a WinZip AES encrypted Zip, remove the encryption properties, and re-write. // // Also demonstrates how to use Unicode and CString with the // Chilkat C++ libs. CkString cks; CkZip zip; CString cs = _T("anything 30-day trial"); wchar_t *w = cs.GetBuffer(); cks.setStringU(w); zip.UnlockComponent(cks.getString()); // 4 = WinZip compatible AES encryption. zip.put_Encryption(4); // Set the password... cs = _T("secret"); cks.setStringU(cs.GetBuffer()); zip.SetPassword(cks.getString()); // Open an AES encrypted .zip cs = _T("encryptedZip.zip"); cks.setStringU(cs.GetBuffer()); zip.OpenZip(cks.getString()); // Unset encryption zip.put_Encryption(0); // Change the name of the .zip to be written. // If this is omitted, the original zip would be overwritten. cs = _T("unencryptedZip.zip"); cks.setStringU(cs.GetBuffer()); zip.put_FileName(cks.getString()); // Write the zip. zip.WriteZipAndClose(); zip.SaveLastError("writeZipLog.txt");
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.