92 references to RegistryKeyPermissionCheck
mscorlib (87)
microsoft\win32\registrykey.cs (80)
159private volatile RegistryKeyPermissionCheck checkMode; 295public RegistryKey CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck) 303public RegistryKey CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions options) 311return CreateSubKeyInternal(subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree, null, RegistryOptions.None); 317return CreateSubKeyInternal(subkey, writable ? RegistryKeyPermissionCheck.ReadWriteSubTree : RegistryKeyPermissionCheck.ReadSubTree, null, options); 325public unsafe RegistryKey CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity) 333public unsafe RegistryKey CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions, RegistrySecurity registrySecurity) 343private unsafe RegistryKey CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, object registrySecurityObj, RegistryOptions registryOptions) 353RegistryKey key = InternalOpenSubKey(subkey, (permissionCheck != RegistryKeyPermissionCheck.ReadSubTree)); 355CheckPermission(RegistryInternalCheck.CheckSubKeyWritePermission, subkey, false, RegistryKeyPermissionCheck.Default); 362CheckPermission(RegistryInternalCheck.CheckSubKeyCreatePermission, subkey, false, RegistryKeyPermissionCheck.Default); 389GetRegistryKeyAccess(permissionCheck != RegistryKeyPermissionCheck.ReadSubTree) | (int)regView, 395RegistryKey key = new RegistryKey(result, (permissionCheck != RegistryKeyPermissionCheck.ReadSubTree), false, remoteKey, false, regView); 433CheckPermission(RegistryInternalCheck.CheckSubKeyWritePermission, subkey, false, RegistryKeyPermissionCheck.Default); 501CheckPermission(RegistryInternalCheck.CheckSubTreeWritePermission, subkey, false, RegistryKeyPermissionCheck.Default); 586CheckPermission(RegistryInternalCheck.CheckValueWritePermission, name, false, RegistryKeyPermissionCheck.Default); 638key.checkMode = RegistryKeyPermissionCheck.Default; 708key.checkMode = RegistryKeyPermissionCheck.Default; 734CheckPermission(RegistryInternalCheck.CheckOpenSubKeyWithWritablePermission, name, writable, RegistryKeyPermissionCheck.Default); 765public RegistryKey OpenSubKey(String name, RegistryKeyPermissionCheck permissionCheck) { 781public RegistryKey OpenSubKey(String name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights) { 788private RegistryKey InternalOpenSubKey(String name, RegistryKeyPermissionCheck permissionCheck, int rights) { 802RegistryKey key = new RegistryKey(result, (permissionCheck == RegistryKeyPermissionCheck.ReadWriteSubTree), false, remoteKey, false, regView); 867CheckPermission(RegistryInternalCheck.CheckKeyReadPermission, null, false, RegistryKeyPermissionCheck.Default); 998CheckPermission(RegistryInternalCheck.CheckKeyReadPermission, null, false, RegistryKeyPermissionCheck.Default); 1043CheckPermission(RegistryInternalCheck.CheckKeyReadPermission, null, false, RegistryKeyPermissionCheck.Default); 1077CheckPermission(RegistryInternalCheck.CheckKeyReadPermission, null, false, RegistryKeyPermissionCheck.Default); 1128CheckPermission(RegistryInternalCheck.CheckValueReadPermission, name, false, RegistryKeyPermissionCheck.Default); 1153CheckPermission(RegistryInternalCheck.CheckValueReadPermission, name, false, RegistryKeyPermissionCheck.Default); 1168CheckPermission(RegistryInternalCheck.CheckValueReadPermission, name, false, RegistryKeyPermissionCheck.Default); 1394CheckPermission(RegistryInternalCheck.CheckValueReadPermission, name, false, RegistryKeyPermissionCheck.Default); 1472CheckPermission(RegistryInternalCheck.CheckValueWritePermission, name, false, RegistryKeyPermissionCheck.Default); 1475CheckPermission(RegistryInternalCheck.CheckValueCreatePermission, name, false, RegistryKeyPermissionCheck.Default); 1835private void CheckPermission(RegistryInternalCheck check, string item, bool subKeyWritable, RegistryKeyPermissionCheck subKeyCheck) { 1855BCLDebug.Assert(checkMode == RegistryKeyPermissionCheck.Default, "Should be called from a key opened under default mode only!"); 1857BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1867BCLDebug.Assert(checkMode != RegistryKeyPermissionCheck.ReadSubTree, "We shouldn't allow creating sub key under read-only key!"); 1869BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1870if( checkMode == RegistryKeyPermissionCheck.Default) { 1881BCLDebug.Assert(checkMode != RegistryKeyPermissionCheck.ReadSubTree, "We shouldn't allow creating sub key under read-only key!"); 1883BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1884if( checkMode == RegistryKeyPermissionCheck.Default) { 1899BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1900if( checkMode == RegistryKeyPermissionCheck.Default) { 1911BCLDebug.Assert(checkMode != RegistryKeyPermissionCheck.ReadSubTree, "We shouldn't allow writing value to read-only key!"); 1913BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1914if( checkMode == RegistryKeyPermissionCheck.Default) { 1926BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1938BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1939if( checkMode == RegistryKeyPermissionCheck.Default) { 1950BCLDebug.Assert(checkMode != RegistryKeyPermissionCheck.ReadSubTree, "We shouldn't allow writing value to read-only key!"); 1952BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1954if( checkMode == RegistryKeyPermissionCheck.Default) { 1965BCLDebug.Assert(checkMode != RegistryKeyPermissionCheck.ReadSubTree, "We shouldn't allow creating value under read-only key!"); 1967BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1969if( checkMode == RegistryKeyPermissionCheck.Default) { 1980if( checkMode == RegistryKeyPermissionCheck.Default) { 1983BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 1995if( subKeyCheck == RegistryKeyPermissionCheck.ReadSubTree) { 1996if( checkMode == RegistryKeyPermissionCheck.Default) { 2006else if(subKeyCheck == RegistryKeyPermissionCheck.ReadWriteSubTree) { 2007if( checkMode != RegistryKeyPermissionCheck.ReadWriteSubTree) { 2023BCLDebug.Assert(subKeyCheck == RegistryKeyPermissionCheck.Default, "subKeyCheck should be Default (unused)"); 2026if(checkMode == RegistryKeyPermissionCheck.Default) { 2036if( subKeyWritable && (checkMode == RegistryKeyPermissionCheck.ReadSubTree)) { 2053if(subKeyCheck == RegistryKeyPermissionCheck.Default) { 2054if( checkMode == RegistryKeyPermissionCheck.Default) { 2118static int GetRegistryKeyAccess(RegistryKeyPermissionCheck mode) { 2121case RegistryKeyPermissionCheck.ReadSubTree: 2122case RegistryKeyPermissionCheck.Default: 2126case RegistryKeyPermissionCheck.ReadWriteSubTree: 2138private RegistryKeyPermissionCheck GetSubKeyPermissonCheck(bool subkeyWritable) { 2139if( checkMode == RegistryKeyPermissionCheck.Default) { 2144return RegistryKeyPermissionCheck.ReadWriteSubTree; 2147return RegistryKeyPermissionCheck.ReadSubTree; 2172static private void ValidateKeyMode(RegistryKeyPermissionCheck mode) { 2173if( mode < RegistryKeyPermissionCheck.Default || mode > RegistryKeyPermissionCheck.ReadWriteSubTree) {
system\runtime\interopservices\registrationservices.cs (2)
965RegistryKeyPermissionCheck.ReadSubTree)) 974RegistryKeyPermissionCheck.ReadSubTree))
system\timezoneinfo.cs (5)
936RegistryKeyPermissionCheck.Default, 1435RegistryKeyPermissionCheck.Default, 2314RegistryKeyPermissionCheck.Default, 2491RegistryKeyPermissionCheck.Default, 2776RegistryKeyPermissionCheck.Default,
WindowsBase (1)
Base\System\Windows\BaseCompatibilityPreferences.cs (1)
251using (var regKey = Registry.CurrentUser.OpenSubKey(WpfPackagingSubKeyPath, RegistryKeyPermissionCheck.ReadSubTree))
WsatConfig (1)
Configuration\StdRegProviderWrapper.cs (1)
337RegistryKeyPermissionCheck.ReadWriteSubTree,
WsatUI (3)
Configuration\RegistryHelper.cs (2)
42RegistryKeyPermissionCheck.ReadWriteSubTree, 88RegistryKeyPermissionCheck.ReadWriteSubTree,
Configuration\StdRegProviderWrapper.cs (1)
337RegistryKeyPermissionCheck.ReadWriteSubTree,