111,120
社区成员
发帖
与我相关
我的任务
分享
SecurityIdentifier everyone = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
MutexAccessRule allowEveryone = new MutexAccessRule(everyone, MutexRights.FullControl, AccessControlType.Allow);
MutexSecurity mutexSecurity = new MutexSecurity();
mutexSecurity.AddAccessRule( allowEveryone );
bool createNew;
Mutex mutex = new Mutex(false, "MyMutex", out createNew, mutexSecurity);