Visual C++ Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Visual C++ Examples

CkString
Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

 

 

Delete Files from a Zip File

Download Chilkat C++ Libraries for VC++ 8.0 / Win32

Download Chilkat C++ Libraries for VC++ 7.0 / Win32

Download Chilkat C++ Libraries for VC++ 6.0 / Win32

Demonstrates how to delete files from a Zip archive.

// Visual C++ Example Source Code to remove (delete) a file from a Zip archive
//

#include "stdafx.h"

#include "CkZip.h"
#include "CkZipEntry.h"

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
    // Unlock the Zip product.
    // This only needs to be done once when the first CkZip object
    // is instantiated.
    CkZip zip;
    zip.UnlockComponent("unlockCode");

    // Open an existing Zip file.
    zip.OpenZip("tree.zip");
    
    // Find the "il941.pdf" entry
    CkZipEntry *entry = zip.FirstMatchingEntry("*/il941.pdf");
    if (entry)
	{
	// Remove it from the Zip object.
	zip.DeleteEntry(entry);
	delete entry;
	}

    // Update the Zip archive.
    zip.WriteZipAndClose(0);

    return 0;
}


 

 

 

Need a specific example? Send a request to support@chilkatsoft.com

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

Mail Component · .NET Mail Component · XML Parser