The following demonstrates how to use Delphi language to download random data from a SwiftRNG device when used with the Entropy Server for Windows. The following code will only work when running SwiftRNG Entropy Server.
Before using the following examples, make sure your Delphi project is targeted for Windows 32 bit platform and the SwiftRNG device is plugged into one of USB ports available. A thread-safe and process-safe 32 bit SwiftRNG.dll is included in the software kit.

A sample source code for retrieving an array of random bytes from SwiftRNG device when using Entropy Server for Windows

//
//
// A sample Delphi program that demonstrates how to retrieve random bytes from
// Entropy Server using 32 bit SwiftRNG.dll.
// This example is a modified version of Zac's code sample.
//

program Project1;

{$APPTYPE CONSOLE}
{$R *.res}

uses
  System.SysUtils;

const
  randomNumberCount = 50; // How many random bytes to retrieve

type
  RandomBuffer = array [0 .. (randomNumberCount - 1)] of byte;
  xbuffer = ^RandomBuffer;


var
  i, z: integer;
  zbuffer: randombuffer;

Function swftGetEntropyFromEntropyServer(ybuffer: xbuffer; y: longword): integer; stdcall; external 'C:\tools\windows-x86\SwiftRNG.dll';

begin
  try
    z := swftGetEntropyFromEntropyServer(@zbuffer, randomNumberCount);
    writeln('status = ', z);

     if z=0 then begin

        for i:=0 to randomNumberCount-1 do
          writeln('randombyte[',i,'] = ',zbuffer[i]);
        end

      else
        writeln('error occurred in SwftRNG');


    readln;
  except
    on E: Exception do
      writeln(E.ClassName, ': ', E.Message);
  end;

end.