Delphi Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Delphi Examples

Bounced Mail
Bz2
Character Encoding
CSV
DKIM / DomainKey
Digital Certificates
Digital Signatures
DH Key Exchange
DSA
Email
Email Object
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
NTLM
POP3
RSA
S/MIME
SMTP
Socket
Spider
SFTP
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Byte Array
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

Type Conversion

 

Article: Understanding COM References in Delphi

Create Self-Extracting EXE

Download Chilkat Zip ActiveX (includes objects for .zip, .gz, .bz2, and .Z)

Delphi example code showing how to create a self-extracting executable.

// Creates a self-extracting EXE
procedure TForm1.Button13Click(Sender: TObject);
var
  recurse: Integer;
  success: Integer;

begin
  // UnlockComponent should be called once at the beginning of a program.
  ChilkatZip21.UnlockComponent('anything for 30-day trial');

  // Initialize the zip object.
  ChilkatZip21.NewZip('xyz.zip');

  // Add a directory tree to the zip object.  The AppendFiles
  // method recursively descends a directory and adds references to
  // files and directories to the zip object.  When the
  // zip is written (by calling WriteExe) all referenced files
  // and directories are added.
  recurse := 1;
  ChilkatZip21.AppendFiles('c:/temp/xyz/*', recurse);

  {
    The directory tree on disk looks like this:

C:\temp\xyz\dudeA.gif
C:\temp\xyz\setup.exe
C:\temp\xyz\b\
C:\temp\xyz\b\dudeAbc.gif
C:\temp\xyz\b\dudeXyz.gif
C:\temp\xyz\b\setup1.exe
C:\temp\xyz\b\123\
C:\temp\xyz\b\123\dude123.gif
C:\temp\xyz\b\123\test.txt

    The directory tree in the zip object looks like this:

dudeA.gif
setup.exe
b\
b\dudeAbc.gif
b\dudeXyz.gif
b\setup1.exe
b\123\
b\123\dude123.gif
b\123\test.txt

  }

  // Write the .exe
  success := ChilkatZip21.WriteExe('xyz.exe');
  if (success = 0) then begin
      ChilkatZip21.SaveLastError('zipErrorLog.txt');
      ShowMessage(ChilkatZip21.LastErrorText);
  end;

  ShowMessage('Done!');

end;

 

 

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

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

Mail Component · .NET Email Component · XML Parser