Sample code for 30+ languages & platforms
Delphi DLL

Example: Http.GetCacheRoot method

Demonstrates the GetCacheRoot method.

Chilkat Delphi DLL Downloads

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

...

procedure TForm1.Button1Click(Sender: TObject);
var
http: HCkHttp;

begin
http := CkHttp_Create();

// Establish 2 cache root directories.
CkHttp_AddCacheRoot(http,'c:/example/httpCacheA/');
CkHttp_AddCacheRoot(http,'c:/example/httpCacheB/');

Memo1.Lines.Add('Number of cache roots: ' + IntToStr(CkHttp_getNumCacheRoots(http)));

Memo1.Lines.Add('1st cache root: ' + CkHttp__getCacheRoot(http,0));
Memo1.Lines.Add('2nd cache root: ' + CkHttp__getCacheRoot(http,1));

// Output:

// Number of cache roots: 2
// 1st cache root: c:/example/httpCacheA/
// 2nd cache root: c:/example/httpCacheB/

CkHttp_Dispose(http);

end;