Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ OpenSubKey() [2/2]

RegistryKey Internal.Win32.RegistryKey.OpenSubKey ( string name,
bool writable )
inline

Definition at line 51 of file RegistryKey.cs.

52 {
54 int num = Interop.Advapi32.RegOpenKeyEx(_hkey, name, 0, writable ? 131103 : 131097, out hkResult);
55 if (num == 0 && !hkResult.IsInvalid)
56 {
57 return new RegistryKey(hkResult);
58 }
59 if (num == 5 || num == 1346)
60 {
62 }
63 return null;
64 }
readonly SafeRegistryHandle _hkey
RegistryKey(SafeRegistryHandle hkey)
static int RegOpenKeyEx(SafeRegistryHandle hKey, string lpSubKey, int ulOptions, int samDesired, out SafeRegistryHandle hkResult)
static string Security_RegistryPermission
Definition SR.cs:1858
Definition SR.cs:7

References Internal.Win32.RegistryKey.RegistryKey(), Internal.Win32.RegistryKey._hkey, Interop.Advapi32.RegOpenKeyEx(), and System.SR.Security_RegistryPermission.