Changeset 2661
- Timestamp:
- 05/24/12 05:25:09 (12 months ago)
- File:
-
- 1 edited
-
trunk/eraser/Eraser/Program.GuiProgram.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser/Program.GuiProgram.cs
r2538 r2661 57 57 58 58 //Check if there already is another instance of the program. 59 bool isFirstInstance = false; 60 GlobalMutex = new Mutex(true, instanceID, out isFirstInstance); 61 IsFirstInstance = isFirstInstance; 59 try 60 { 61 bool isFirstInstance = false; 62 GlobalMutex = new Mutex(true, instanceID, out isFirstInstance); 63 IsFirstInstance = isFirstInstance; 64 } 65 catch (UnauthorizedAccessException) 66 { 67 //If we get here, the mutex exists but we cannot modify it. That 68 //would imply that this is not the first instance. 69 //See http://msdn.microsoft.com/en-us/library/bwe34f1k.aspx 70 IsFirstInstance = false; 71 } 62 72 } 63 73
Note: See TracChangeset
for help on using the changeset viewer.
