初学c#,请教各位
public Mutex (
bool initiallyOwned,
string name,
out bool createdNew,
MutexSecurity mutexSecurity
)
这个函数如何把最后一个参数设置成类似于c中Everyone的安全属性啊?
public Mutex (
bool initiallyOwned,
string name,
out bool createdNew,
MutexSecurity mutexSecurity
)
这个函数如何把最后一个参数设置成类似于c中Everyone的安全属性啊?
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);