unit InitForm;
 
interface
 
uses
 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 StdCtrls;
 
type
 TInitFrm = class(TForm)
 SpawnThrd: TButton;
 procedure SpawnThrdClick(Sender: TObject);
 private
 { Private declarations }
 public
 { Public declarations }
 end;
 
var
 InitFrm: TInitFrm;
 
implementation
 
uses DLLCaller;
 
{$R *.DFM}
 
procedure TInitFrm.SpawnThrdClick(Sender: TObject);
 
var
 CallerThread:TDLLCaller;
 
begin
 CallerThread:=TDLLCaller.Create(true);
 with CallerThread do
 begin
 FreeOnTerminate := true;
 Resume;
 end;
end;
 
end.