Autor Beitrag
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.10.03 13:03 
Wen es interessiert: Hier gibt es die Antwort: www.delphipraxis.net...unter+delphi+20.html
focus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187

XP, 2k, 98, Me
D6 Prof
BeitragVerfasst: Mo 27.10.03 16:30 
*g* jetzt check ich erst was du meinst :) *aufkopfhau*
Du willst verhindern das dein Programm zweimal läuft...

Ich dachte du meinst:
"Wie kann ich rausfinden ob mein Programm auf einem W2k Rechner läuft obwohl ich selbst unter W`98 arbeite?!" (...)

Es gibt auch eine entsprechende Komponente Namens "justone" von Utilmind... bei den meissten Sachen von denen sind die Sourcen dabei ... evtl findest du da was.

Gruss
Michael
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mo 27.10.03 17:18 
*g* habe es auch falsch verstanden :mrgreen:
aber jetzt hast du ja anscheinend ne Lösung ;)
Klaus D.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Mo 27.10.03 17:23 
Hallo

versuche es mal damit.

Tschö Klaus
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
var
  Form1: TForm1;
  mHandle: THandle;    // Mutexhandle

implementation

{$R *.DFM}

Initialization 
  mHandle := CreateMutex(nil,True,'XYZ'); 
  if GetLastError = ERROR_ALREADY_EXISTS then 
   begin 
     showMessage('Program is already running!'); 
     halt; 
  end; 

finalization 
  if mHandle <> 0 then CloseHandle(mHandle) 
end. 


end.


Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mo 27.10.03 18:44 
...eine Liste aller laufenden Exe-Dateien erhalten/ Überprüfen, ob eine Exe-Datei läuft?

www.swissdelphicente.../showcode.php?id=616