Chilkat Delphi DLL API v9.4 SP1 » Developer.Team

Chilkat Delphi DLL API v9.4 SP1

Chilkat Delphi DLL API v9.4 SP1
Chilkat Delphi DLL API v9.4 SP1 | 6 Mb


Chilkat Delphi DLL API for EmbarcaderoВ® RAD Studio XE5, XE4, XE3, and XE2.

Quick Start Instructions

Download and unzip to any directory. Unzipping will create a chilkat-9.4.1-delphi subdirectory containing the following files:

README.txt A text file pointing to this document and other sources of information.
ChilkatDelphiXE.dll The Chilkat 32-bit DLL providing the implementation for all Chilkat objects.
This DLL is not an ActiveX. It does not need to be registered via regsvr32.
ChilkatDelphiXE64.dll The Chilkat 64-bit DLL providing the implementation for all Chilkat objects.
LICENSE.txt The full EULA license agreement.
*.pas A Pascal interface source file for each Chilkat object.

Start the Delphi RAD Studio IDE and create a new VCL Forms Application. Save it to the chilkat-9.4.1-delphi where the ChilkatDelphiXE.dll and Chilkat *.pas files are located.
Add a TButton and TMemo to the form.
Add each of the Chilkat interfaces that will be used to the "uses" section. For example, if the project will use only Crypt2.pas, add "Crypt2" to the "uses" section:

    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Crypt2;


Select Project --> Add to Project and then add each of the Chilkat .pas sources listed in the "uses" section to your project. In this case, add "Crypt2.pas" to the project.
Double-click on the Button1 on your form to add code to handle the click event. For example, to AES encrypt some text, add the following code, which can be found at Delphi AES Encryption


    procedure TForm1.Button1Click(Sender: TObject);
    var
    crypt: HCkCrypt2;
    success: Boolean;
    ivHex: PWideChar;
    keyHex: PWideChar;
    encStr: PWideChar;
    decStr: PWideChar;

    begin
    crypt := CkCrypt2_Create();

    success := CkCrypt2_UnlockComponent(crypt,'Anything for 30-day trial');
    if (success <> True) then
      begin
        Memo1.Lines.Add(CkCrypt2__lastErrorText(crypt));
        Exit;
      end;

    CkCrypt2_putCryptAlgorithm(crypt,'aes');
    CkCrypt2_putCipherMode(crypt,'cbc');
    CkCrypt2_putKeyLength(crypt,256);
    CkCrypt2_putPaddingScheme(crypt,0);
    CkCrypt2_putEncodingMode(crypt,'hex');
    ivHex := '000102030405060708090A0B0C0D0E0F';
    CkCrypt2_SetEncodedIV(crypt,ivHex,'hex');
    keyHex := '000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F';
    CkCrypt2_SetEncodedKey(crypt,keyHex,'hex');

    encStr := CkCrypt2__encryptStringENC(crypt,'The quick brown fox jumps over the lazy dog.');
    Memo1.Lines.Add(encStr);

    decStr := CkCrypt2__decryptStringENC(crypt,encStr);
    Memo1.Lines.Add(decStr);

    CkCrypt2_Dispose(crypt);
    end;


Build the project to create the output .EXE
Important: Copy the ChilkatDelphiXE.dll to the same directory where the output .EXE is located. This will typically be in a subdirectory such as "Win32/Debug". The ChilkatDelphiXE.dll must be located in the same directory as your application's .EXE.
Run.
Note: The ChilkatDelphiXE.dll is a 32-bit Windows DLL. It can only be loaded from a project that is built for the Win32 Target Platform.
Important: For 64-bit builds, rename ChilkatDelphiXE.dll to ChilkatDelphiXE32.dll. Then rename ChilkatDelphiXE64.dll to ChilkatDelphiXE.dll. The pathname of the DLL must match the pathname specified in each of the Chilkat .pas source files.
See http://www.cknotes.com/?p=490 for more information.

Home:
http://www.chilkatsoft.com/delphiDll.asp


Only for V.I.P
Warning! You are not allowed to view this text.