Einzelnen Beitrag anzeigen

mjustin

Registriert seit: 14. Apr 2008
3.005 Beiträge
 
Delphi 2009 Professional
 
#5

Re: Programmstart nur 2 mal zulassen

  Alt 31. Mär 2009, 18:14
Zitat von LokutusvB:
Hallo Leute,

ich möchte in meiner Delphi-Anwendung externe Programme starten können. Das funktioniert so weit sehr gut. Nun möchte ich aber für verschiedene Applikationen den Start nicht auf einmalig (Only One Instance - Beispiele findet man ja im netz zur Genüge) setzen, sondern den Start einer Anwendung 2 mal gleichzeitig erlauben. Allerdings stehe ich zur Zeit total auf dem Schlauch, wie ich das machen soll . Mit getLastError = ERROR_ALREADY_EXISTS komme ich nicht wirklich weiter, das nutze ich schon für die Delphianwendung selbst.

Hat hier jemand Lösungsansätze?
In der Jedi Code Library gibt es in der Unit JclAppInst Funktionen, die eine bestimmte Anzahl Instanzen zulassen (von 1 bis <beliebige Zahl>), wobei <beliebige Zahl> natürlich eine natürliche Zahl ist.

Aus der JCL Doku zu JclAppInst.pas:

Zitat:
"This unit contains a class and support routines for controlling the number of concurrent instances of your application that can exist at any time. In addition there is support for simple interprocess communication between these instance including a notification mechanism."
Cheers,
Michael Justin
habarisoft.com
  Mit Zitat antworten Zitat