Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | daniel-mar | 1 | program Compiler; |
2 | |||
3 | uses |
||
4 | SysUtils, |
||
5 | Windows, |
||
6 | Forms, |
||
7 | Dialogs, |
||
8 | ComMain in 'ComMain.pas' {MainForm}; |
||
9 | |||
10 | {$Description 'SpaceMission 1.1 Compiler'} |
||
11 | |||
12 | var |
||
13 | Sem: THandle; |
||
14 | |||
15 | {$R *.RES} |
||
16 | |||
17 | begin |
||
18 | { Programm schon gestartet? } |
||
19 | Sem := CreateSemaphore(nil, 0, 1, 'SpaceMission Compiler'); |
||
20 | if (Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS) then |
||
21 | begin |
||
22 | CloseHandle(Sem); |
||
23 | MessageDlg('Das Programm wurde bereits gestartet.', mtInformation, [mbOK], 0); |
||
24 | exit; |
||
25 | end; |
||
26 | Application.Initialize; |
||
27 | Application.Title := 'Levelcompiler'; |
||
28 | Application.CreateForm(TMainForm, MainForm); |
||
29 | Application.Run; |
||
30 | end. |