program Test;
uses
MidasLib,
Windows,
Forms,
Dialogs,
SysUtils,
AdrbookUnit in 'AdrbookUnit.pas' {Form3},
LogFileUnit in 'LogFileUnit.pas' {Form4},
uLkJSON in 'uLkJSON.pas',
MainUnit in 'MainUnit.pas' {Form1},
OptionsUnit in 'OptionsUnit.pas' {Form2},
IdSSLOpenSSL in 'C:\Programme\CodeGear\
RAD Studio\5.0\source\
Indy\Indy10\Protocols\IdSSLOpenSSL.pas',
InfoUnit in 'InfoUnit.pas' {Form5};
{$R *.res}
{$R 'Win7UAC.res'}
var Semaphore: THandle;
begin
if (ParamCount>0) and (FileExists(ParamStr(1))) then
begin
Form1.Show;
end;
Semaphore := CreateSemaphore(nil, 1, 1, PChar(MainUnit.MyGUID));
if (GetLastError = ERROR_ALREADY_EXISTS) then
PostMessage (HWND_BROADCAST, MainUnit.ActivationMessage,0,0)
else
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.Title := 'Test Programm';
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm5, Form5);
Application.Run;
end;
CloseHandle(Semaphore);
end.