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