RegistryPermissionAccess 枚举

定义

指定允许的对注册表项和值的访问权。Specifies the permitted access to registry keys and values.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class RegistryPermissionAccess
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum RegistryPermissionAccess
type RegistryPermissionAccess = 
Public Enum RegistryPermissionAccess
继承
RegistryPermissionAccess
属性

字段

AllAccess 7

对注册表变量的 CreateReadWrite 访问权限。Create, Read, and Write access to registry variables. AllAccess 表示多个 RegistryPermissionAccess 值,如果将它用作 ArgumentException 方法的 access 参数(它需要单一值),则引发 GetPathList(RegistryPermissionAccess)AllAccess represents multiple RegistryPermissionAccess values and causes an ArgumentException when used as the access parameter for the GetPathList(RegistryPermissionAccess) method, which expects a single value.

Create 4

可以创建注册表变量。Create access to registry variables.

NoAccess 0

没有对注册表变量的访问权限。No access to registry variables. NoAccess 不表示有效的 RegistryPermissionAccess 值,如果将它用作 ArgumentException 的参数(它需要单一值),则引发 GetPathList(RegistryPermissionAccess)NoAccess represents no valid RegistryPermissionAccess values and causes an ArgumentException when used as the parameter for GetPathList(RegistryPermissionAccess), which expects a single value.

Read 1

可以读注册表变量。Read access to registry variables.

Write 2

可以写注册表变量。Write access to registry variables.

注解

RegistryPermissionAccess 值是独立的;对一种类型的访问权限的权限并不意味着对另一种访问权限。RegistryPermissionAccess values are independent; rights to one type of access do not imply rights to another. 例如,Write 权限并不意味着拥有 ReadCreate权限。For instance, Write permission does not imply permission to Read or Create.

备注

尽管 NoAccessAllAccessRegistryPermissionAccess中出现,但它们对于用作 RegistryPermission.GetPathList 的参数是无效的,因为它们分别描述了不存在的注册表变量访问类型或所有注册表变量访问类型,并且 GetPathList 需要单个注册表变量访问类型。Although NoAccess and AllAccess appear in RegistryPermissionAccess, they are not valid for use as the parameter for RegistryPermission.GetPathList because they describe no registry variable access types or all registry variable access types, respectively, and GetPathList expects a single registry variable access type.

适用于

另请参阅