MFC Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CUnicode C++Unicode CMFCDelphi DLLDelphi ActiveXFoxProJavaPerlPHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

MFC Examples

Bounced Mail
Bz2
Certificates/Keys
Charset
CSV
Diffie-Hellman
DKIM / DomainKey
DSA
Email Object
Encryption
FileAccess
FTP
HTML Conversion
HTTP
IMAP
MHT / HTML Email
MIME
NTLM
POP3
RSA
SMTP
Socket
Spider
SSH Key
SSH
SSH Tunnel
SFTP
Tar
Upload
XML
Zip
Amazon S3


 

 

 

 

 

 

 

 

Open and Unzip an AES Encrypted Zip

Open and unzip an AES encrypted Zip.

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
FreeBSD C++ Libraries
HP-UX C++ Libraries
BlackBerry QNX C++ Libraries
// Needs #include <CkZip.h>

    CkString strOut;

    CkZip zip;

    bool success;

    //  Any string unlocks the component for the 1st 30-days.
    success = zip.UnlockComponent("Anything for 30-day trial");
    if (success != true) {
        strOut.append(zip.lastErrorText());
        strOut.append("\r\n");
        SetDlgItemText(IDC_EDIT1,strOut.getUnicode());
        return;
    }

    success = zip.OpenZip("/myZips/aes.zip");
    if (success != true) {
        strOut.append(zip.lastErrorText());
        strOut.append("\r\n");
        SetDlgItemText(IDC_EDIT1,strOut.getUnicode());
        return;
    }

    //  Set the password needed to unzip.
    //  This password must match the password used when the zip
    //  was created.
    zip.put_DecryptPassword("myPassword");

    long unzipCount;

    //  Unzip the .zip into /unzipDir.
    //  Returns the number of files and directories unzipped.
    unzipCount = zip.Unzip("/unzipDir/");
    if (unzipCount < 0) {
        strOut.append(zip.lastErrorText());
        strOut.append("\r\n");
    }
    else {
        strOut.append("Success!\r\n");
    }


    SetDlgItemText(IDC_EDIT1,strOut.getUnicode());

© 2000-2013 Chilkat Software, Inc. All Rights Reserved.