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