Modify check for EventWaitHandle

This commit is contained in:
Travis Nickles 2018-07-26 03:23:38 -05:00
parent ffbcdb21b3
commit e5cd923e03

View File

@ -81,7 +81,9 @@ namespace DS4Windows
try
{
// another instance is already running if OpenExsting succeeds.
threadComEvent = EventWaitHandle.OpenExisting(SingleAppComEventName);
threadComEvent = EventWaitHandle.OpenExisting(SingleAppComEventName,
System.Security.AccessControl.EventWaitHandleRights.Synchronize |
System.Security.AccessControl.EventWaitHandleRights.Modify);
threadComEvent.Set(); // signal the other instance.
threadComEvent.Close();
return; // return immediatly.