Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

Visual Basic 6.0 Examples

Web API Categories

ASN.1
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text

HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(Visual Basic 6.0) Zip Append Files Verbose Logging

An application can check verbose LastErrorText if the zip.AppendFiles method does not append the expected files, or if it appends nothing.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim success As Long
Dim zip As New ChilkatZip
success = zip.NewZip("qa_output/test1.zip")

' Turn on verbose logging to get more informaiton in the LastErrorText property.
zip.VerboseLogging = 1

Dim recurse As Long
recurse = 1
zip.AppendFromDir = "qa_data/syncTree"
success = zip.AppendFiles("*",recurse)

' Even if AppendFiles is successful, we can examine the LastErrorText property
' to see what happend.  (This is true for all Chilkat methods.  The LastErrorText always
' contains information even when the method call is successful.  If you have a difficult
' time understanding what happened, then turn on VerboseLogging and have a look at it.
' Make sure to turn off VerboseLogging for production because it could slow down your application.)
Debug.Print zip.LastErrorText

' Here is a sample of the LastErrorText for this test:

' ChilkatLog:
'   AppendFiles(62ms):
'     DllDate: Feb 10 2019
'     ChilkatVersion: 9.5.0.76
'     UnlockPrefix: ***
'     Architecture: Little Endian; 64-bit
'     Language: .NET 4.5 / x64 / VS2012
'     VerboseLogging: 1
'     Component successfully unlocked using purchased unlock code.
'     appendFileEx(62ms):
'       FilePattern: *
'       AppendFromDir: qa_data/syncTree
'       PathPrefix: 
'       BaseDir: c:\appData\UnitTest\qa_data\syncTree\
'       InzipBase: 
'       FilenamePart: *
'       IsSpecificFile: 0
'       recurse: 1
'       saveExtraPath: 0
'       archiveOnly: 0
'       includeHidden: 1
'       includeSystem: 1
'       ignoreAccessDenied: 1
'       addFilesMax:
'         addDirNonRecursive:
'           ffWin32OpenDir_fileSpec: [c:\appData\UnitTest\qa_data\syncTree\*]
'           ffWin32OpenDir_fileSpec: [c:\appData\UnitTest\qa_data\syncTree\abc\*]
'           ffWin32OpenDir_fileSpec: [c:\appData\UnitTest\qa_data\syncTree\data\*]
'           ffWin32OpenDir_fileSpec: [c:\appData\UnitTest\qa_data\syncTree\text\*]
'           ffWin32OpenDir_fileSpec: [c:\appData\UnitTest\qa_data\syncTree\abc\ghk\*]
'           ffWin32OpenDir_fileSpec: [c:\appData\UnitTest\qa_data\syncTree\data\xyz\*]
'           ffWin32OpenDir_fileSpec: [c:\appData\UnitTest\qa_data\syncTree\text\something\*]
'         --addDirNonRecursive
'       --addFilesMax
'       No exclusion patterns.
'       numAdded: 20
'     --appendFileEx
'     Success.
'   --AppendFiles
' --ChilkatLog

success = zip.WriteZipAndClose()
If (success <> 1) Then
    Debug.Print zip.LastErrorText
    Exit Sub
End If


 

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