public static bool CheckAppExistingInstance(String mutexName)
{
bool retVal = true;
try
{
closeAppMutex();
_appMutex = Mutex.OpenExisting(mutexName);
closeAppMutex();
}
catch
{
//the specified mutex doesn't exist, we should create it
_appMutex = new Mutex(true, mutexName);
retVal = false;
}
return retVal;
}