MutexSecurity 构造函数
定义
初始化 MutexSecurity 类的新实例。Initializes a new instance of the MutexSecurity class.
重载
| MutexSecurity() |
使用默认值初始化 MutexSecurity 类的新实例。Initializes a new instance of the MutexSecurity class with default values. |
| MutexSecurity(String, AccessControlSections) |
使用来自具有指定名称的系统 mutex 的访问控制安全性规则的指定部分初始化 MutexSecurity 类的新实例。Initializes a new instance of the MutexSecurity class with the specified sections of the access control security rules from the system mutex with the specified name. |
MutexSecurity()
使用默认值初始化 MutexSecurity 类的新实例。Initializes a new instance of the MutexSecurity class with default values.
public:
MutexSecurity();
public MutexSecurity ();
Public Sub New ()
注解
新 MutexSecurity 对象始终以空的自由访问列表开头 (DACL) ,这将拒绝所有用户的所有访问。A new MutexSecurity object always starts with an empty discretionary access list (DACL), which denies all access for all users.
适用于
MutexSecurity(String, AccessControlSections)
使用来自具有指定名称的系统 mutex 的访问控制安全性规则的指定部分初始化 MutexSecurity 类的新实例。Initializes a new instance of the MutexSecurity class with the specified sections of the access control security rules from the system mutex with the specified name.
public:
MutexSecurity(System::String ^ name, System::Security::AccessControl::AccessControlSections includeSections);
public MutexSecurity (string name, System.Security.AccessControl.AccessControlSections includeSections);
new System.Security.AccessControl.MutexSecurity : string * System.Security.AccessControl.AccessControlSections -> System.Security.AccessControl.MutexSecurity
Public Sub New (name As String, includeSections As AccessControlSections)
参数
- name
- String
要检索其访问控制安全性规则的系统 mutex 的名称。The name of the system mutex whose access control security rules are to be retrieved.
- includeSections
- AccessControlSections
指定要检索的部分的 AccessControlSections 标志的组合。A combination of AccessControlSections flags specifying the sections to retrieve.
例外
没有具有指定名称的系统对象。There is no system object with the specified name.
注解
此构造函数允许你获取已命名的系统互斥体的访问控制安全性,无需首先创建 Mutex 对象。This constructor allows you to obtain the access control security for a named system mutex without first creating a Mutex object.
使用命名系统对象时必须谨慎。Caution must be exercised when working with named system objects. 如果有一个名为的系统对象 name 不是 mutex,则可能会检索其控制访问安全性。If there is a system object named name that is not a mutex, its control access security might be retrieved.