prepare application
public static System.Threading.Mutex mutex;
public static bool createdNewMutex;
startup application
mutex = new System.Threading.Mutex(true, "a2c204cc-50a1-4fde-b47f-5b712821edf3", out createdNewMutex);
if (!createdNewMutex) base.Shutdown(0);
final exit of the application:
if (App.createdNewMutex) App.mutex.ReleaseMutex();
Keine Kommentare:
Kommentar veröffentlichen