Delphi Examples

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

Delphi Examples

Bounced Mail
Bz2
Character Encoding
CSV
DKIM / DomainKey
Digital Certificates
Digital Signatures
DH Key Exchange
DSA
Email
Email Object
FTP
HTML Conversion
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...
Amazon S3
Byte Array
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

Type Conversion

 

Article: Understanding COM References in Delphi

Create EXE that Downloads Zip from URL and Extracts

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

Download All 32-bit Chilkat ActiveX Components (.zip)

Download All 64-bit Chilkat ActiveX Components (.zip)

Creates an EXE that downloads a .zip from a URL and extracts.

uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, StdCtrls,
    ChilkatZip2Lib_TLB,
    OleCtrls;

...

procedure TForm1.Button1Click(Sender: TObject);
var
zip: TChilkatZip2;
success: Integer;

begin
zip := TChilkatZip2.Create(Self);

//  Any string unlocks the component for the 1st 30-days.
success := zip.UnlockComponent('Anything for 30-day trial');
if (success <> 1) then
  begin
    ShowMessage(zip.LastErrorText);

  end;

//  This example creates a .exe that downloads the .zip from
//  http://www.chilkatsoft.com/testData/testWithSetup.zip,
//  unzips it, and runs the setup.exe contained within.
//  This is an actual URL that can be tested. The setup.exe
//  is a do-nothing program that simply displays a dialog box
//  with an "OK" button.
zip.ExeSourceUrl := 'http://www.chilkatsoft.com/testData/testWithSetup.zip';

//  Set the AutoTemp property to create an EXE that
//  extracts to an auto-chosen temp directory:
zip.AutoTemp := 1;

//  Indicate the file within the .zip that should be run after
//  extraction:
//  Note: You may download the .zip at http://www.chilkatsoft.com/testData/testWithSetup.zip
//  and examine it. You'll see that the "setup.exe" has a path
//  within the .zip, therefore you must specify the path as it
//  exists within the .zip:
zip.AutoRun := 'bin/setup.exe';

//  Indicate that we do not want a main dialog, but we *do* want
//  a progress dialog.
zip.SetExeConfigParam('ShowMain','0');
zip.SetExeConfigParam('ShowProgress','1');

//  Customize the progress dialog:
zip.SetExeConfigParam('ProgressTitle','This is the progress dialog title');
zip.SetExeConfigParam('ProgressCaption','This is the progress dialog caption');

//  Write "mySfx.exe"
success := zip.WriteExe('mySfx.exe');
if (success <> 1) then
  begin
    ShowMessage(zip.LastErrorText);

  end;

ShowMessage('EXE Created!');
end;

 

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

Mail Component · .NET Email Component · XML Parser