![]() |
Programm nur einmal starten
Hallo,
wie kann ich machen, das man meine programm nur einmal starten kann? also man soll niemals 2 oder mehr parallel laufen lassen können. |
Re: Programm nur einmal starten
Such mal nach
![]() |
Re: Programm nur einmal starten
Delphi-Quellcode:
unit NichtDoppeltStarten;
interface implementation uses windows,Dialogs,sysutils; var mHandle: THandle; // Mutexhandle Initialization mHandle := CreateMutex(nil,True,'xxxxx'); // 'xxxxx' Der Anwendungsname ist hier einzutragen if GetLastError = ERROR_ALREADY_EXISTS then begin showMessage('Anwendung läuft bereits!!!!!'); // Wenn du keine Meldung willst, Auskommentieren Halt; end; finalization // ... und Schluß if mHandle <> 0 then CloseHandle(mHandle) end. |
Re: Programm nur einmal starten
Liste der Anhänge anzeigen (Anzahl: 1)
z.B. mit der beigefügten Unit. Funktioniert auf jeden Fall mit D6/D7 und W2K.
Gruß ils |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz