VB.NET Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB.NET Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar Archive
Upload
XML
XMP
Zip Compression
Misc

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

Byte Array
VB.NET FTPS
System.IO

 

 

 

 

 

 

In-Memory Zip / Unzip Code

Download: Chilkat .NET Assemblies

Demonstrates some features of using the Zip component entirely in-memory.

Dim zip As New Chilkat.Zip()

Dim success As Boolean

'  Any string unlocks the component for the 1st 30-days.
success = zip.UnlockComponent("Anything for 30-day trial")
If (success <> true) Then
    MsgBox(zip.LastErrorText)
    Exit Sub
End If


'  NewZip initializes the zip object.  It does not write
'  the file.  The "test.zip" file, in this case, will never be written.
success = zip.NewZip("test.zip")
If (success <> true) Then
    MsgBox(zip.LastErrorText)
    Exit Sub
End If


'  Append a string as a file within the zip object.
Dim entry As Chilkat.ZipEntry
'  The last argument to AppendString2 is a charset name.
entry = zip.AppendString2("test.txt","This is a test 123 ABC 123 ABC","iso-8859-1")


'  zipImage is a byte array that contains a .zip file.
'  The WriteToMemory method writes the .zip to a byte array
'  instead of writing to a file.
Dim zipImage() As Byte
zipImage = zip.WriteToMemory()

'  Now.. let's open the .zip from a byte array.
Dim zip2 As New Chilkat.Zip()

success = zip2.OpenFromMemory(zipImage)
If (success <> true) Then
    MsgBox(zip2.LastErrorText)
    Exit Sub
End If


'  Now get the test.txt entry:
entry = zip2.GetEntryByName("test.txt")
If (entry Is Nothing ) Then
    MsgBox("Failed to find test.txt")
    Exit Sub
End If


'  Inflate the entry to a byte array:
Dim entryBytes() As Byte
entryBytes = entry.Inflate()

'  Inflate the entry to a string:
Dim entryStr As String
entryStr = entry.InflateToString2()

MsgBox(entryStr)


 

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

Mail Component · XML Parser