Subversion Repositories spacemission

Rev

Rev 4 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. program Converter;
  2.  
  3. uses
  4.   SysUtils,
  5.   Windows,
  6.   Forms,
  7.   Dialogs,
  8.   CnvMain in 'CnvMain.pas' {MainForm}{$IF CompilerVersion >= 23.0},
  9.   System.UITypes{$IFEND};
  10.  
  11. {$Description 'SpaceMission 1.1 Converter'}
  12.  
  13. var
  14.   Sem: THandle;
  15.  
  16. {$R *.RES}
  17.  
  18. begin
  19.   { Programm schon gestartet? }
  20.   Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission Converter');
  21.   if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then
  22.   begin
  23.     CloseHandle(Sem);
  24.     MessageDlg('Das Programm wurde bereits gestartet.', mtInformation, [mbOK], 0);
  25.     exit;
  26.   end;
  27.   Application.Initialize;
  28.   Application.Title := 'Levelconverter';
  29.   Application.CreateForm(TMainForm, MainForm);
  30.   Application.Run;
  31. end.
  32.