97 references to Interop
Microsoft.Win32.Registry (97)
_generated\0\LibraryImports.g.cs (3)
81
internal static partial int RegCreateKeyEx(global::Microsoft.Win32.SafeHandles.SafeRegistryHandle hKey, string lpSubKey, int Reserved, string lpClass, int dwOptions, int samDesired, ref global::
Interop
.Kernel32.SECURITY_ATTRIBUTES secAttrs, out global::Microsoft.Win32.SafeHandles.SafeRegistryHandle hkResult, out int lpdwDisposition)
98
fixed (global::
Interop
.Kernel32.SECURITY_ATTRIBUTES* __secAttrs_native = &secAttrs)
128
static extern unsafe int __PInvoke(nint __hKey_native, ushort* __lpSubKey_native, int __Reserved_native, ushort* __lpClass_native, int __dwOptions_native, int __samDesired_native, global::
Interop
.Kernel32.SECURITY_ATTRIBUTES* __secAttrs_native, nint* __hkResult_native, int* __lpdwDisposition_native);
Microsoft\Win32\RegistryKey.cs (69)
119
Interop
.Advapi32.RegFlushKey(_hkey);
160
Interop
.Advapi32.RegCloseKey(HKEY_PERFORMANCE_DATA);
222
Interop
.Kernel32.SECURITY_ATTRIBUTES secAttrs =
Interop
.Kernel32.SECURITY_ATTRIBUTES.Create(pSecurityDescriptor);
225
int ret =
Interop
.Advapi32.RegCreateKeyEx(_hkey,
294
int ret =
Interop
.Advapi32.RegDeleteKeyEx(_hkey, subkey, (int)_regView, 0);
298
if (ret ==
Interop
.Errors.ERROR_FILE_NOT_FOUND)
350
int ret =
Interop
.Advapi32.RegDeleteTree(key._hkey, string.Empty);
359
ret =
Interop
.Advapi32.RegDeleteKeyEx(key._hkey, string.Empty, (int)_regView, 0);
385
int errorCode =
Interop
.Advapi32.RegDeleteValue(_hkey, name);
391
if (errorCode ==
Interop
.Errors.ERROR_FILE_NOT_FOUND ||
392
errorCode ==
Interop
.Errors.ERROR_FILENAME_EXCED_RANGE)
459
int ret =
Interop
.Advapi32.RegConnectRegistry(machineName, new IntPtr((int)hKey), out SafeRegistryHandle foreignHKey);
472
if (ret ==
Interop
.Errors.ERROR_DLL_INIT_FAILED)
506
int ret =
Interop
.Advapi32.RegOpenKeyEx(_hkey, name, 0, (GetRegistryKeyAccess(writable) | (int)_regView), out SafeRegistryHandle result);
517
if (ret ==
Interop
.Errors.ERROR_ACCESS_DENIED || ret ==
Interop
.Errors.ERROR_BAD_IMPERSONATION_LEVEL)
550
int ret =
Interop
.Advapi32.RegOpenKeyEx(_hkey, name, 0, (int)rights | (int)_regView, out SafeRegistryHandle result);
561
if (ret ==
Interop
.Errors.ERROR_ACCESS_DENIED || ret ==
Interop
.Errors.ERROR_BAD_IMPERSONATION_LEVEL)
577
int ret =
Interop
.Advapi32.RegOpenKeyEx(_hkey, name, 0, GetRegistryKeyAccess(writable) | (int)_regView, out SafeRegistryHandle result);
618
int ret =
Interop
.Advapi32.RegQueryInfoKey(_hkey,
662
int ret =
Interop
.Errors.ERROR_INVALID_HANDLE;
690
ret =
Interop
.Advapi32.RegOpenKeyEx(baseKey,
712
winAccess =
Interop
.Advapi32.RegistryOperations.KEY_READ;
716
winAccess =
Interop
.Advapi32.RegistryOperations.KEY_READ |
Interop
.Advapi32.RegistryOperations.KEY_WRITE;
732
winAccess =
Interop
.Advapi32.RegistryOperations.KEY_READ;
736
winAccess =
Interop
.Advapi32.RegistryOperations.KEY_READ |
Interop
.Advapi32.RegistryOperations.KEY_WRITE;
774
while ((result =
Interop
.Advapi32.RegEnumKeyEx(
782
null)) !=
Interop
.Errors.ERROR_NO_MORE_ITEMS)
786
case
Interop
.Errors.ERROR_SUCCESS:
821
int ret =
Interop
.Advapi32.RegQueryInfoKey(_hkey,
871
while ((result =
Interop
.Advapi32.RegEnumValue(
879
null)) !=
Interop
.Errors.ERROR_NO_MORE_ITEMS)
885
case
Interop
.Errors.ERROR_SUCCESS:
893
case
Interop
.Errors.ERROR_MORE_DATA:
1021
result =
Interop
.Advapi32.RegQueryValueEx(_hkey, name, null, &type, lpData, (uint*)&dataLength);
1030
if (result ==
Interop
.Errors.ERROR_MORE_DATA)
1068
if (result !=
Interop
.Errors.ERROR_SUCCESS)
1081
case
Interop
.Advapi32.RegistryValues.REG_NONE:
1082
case
Interop
.Advapi32.RegistryValues.REG_BINARY:
1083
case
Interop
.Advapi32.RegistryValues.REG_DWORD_BIG_ENDIAN:
1086
case
Interop
.Advapi32.RegistryValues.REG_DWORD:
1087
case
Interop
.Advapi32.RegistryValues.REG_QWORD:
1095
case
Interop
.Advapi32.RegistryValues.REG_SZ:
1096
case
Interop
.Advapi32.RegistryValues.REG_EXPAND_SZ:
1097
case
Interop
.Advapi32.RegistryValues.REG_MULTI_SZ:
1127
if (type ==
Interop
.Advapi32.RegistryValues.REG_MULTI_SZ)
1176
if (type ==
Interop
.Advapi32.RegistryValues.REG_EXPAND_SZ && !doNotExpand)
1204
int ret =
Interop
.Advapi32.RegQueryValueEx(_hkey, name, null, &type, (byte*)null, (uint*)&datasize);
1211
type ==
Interop
.Advapi32.RegistryValues.REG_NONE ? RegistryValueKind.None :
1265
ret =
Interop
.Advapi32.RegSetValueEx(_hkey,
1307
ret =
Interop
.Advapi32.RegSetValueEx(_hkey,
1310
Interop
.Advapi32.RegistryValues.REG_MULTI_SZ,
1320
ret =
Interop
.Advapi32.RegSetValueEx(_hkey,
1323
(valueKind == RegistryValueKind.None ?
Interop
.Advapi32.RegistryValues.REG_NONE :
Interop
.Advapi32.RegistryValues.REG_BINARY),
1334
ret =
Interop
.Advapi32.RegSetValueEx(_hkey,
1337
Interop
.Advapi32.RegistryValues.REG_DWORD,
1347
ret =
Interop
.Advapi32.RegSetValueEx(_hkey,
1350
Interop
.Advapi32.RegistryValues.REG_QWORD,
1574
case
Interop
.Errors.ERROR_ACCESS_DENIED:
1579
case
Interop
.Errors.ERROR_INVALID_HANDLE:
1597
case
Interop
.Errors.ERROR_FILE_NOT_FOUND:
1601
throw new IOException(
Interop
.Kernel32.GetMessage(errorCode), errorCode);
1608
Interop
.Errors.ERROR_ACCESS_DENIED => str != null ?
1612
_ => new IOException(
Interop
.Kernel32.GetMessage(errorCode), errorCode),
Microsoft\Win32\RegistryOptions.cs (2)
11
None =
Interop
.Advapi32.RegistryOptions.REG_OPTION_NON_VOLATILE, // 0x0000
12
Volatile =
Interop
.Advapi32.RegistryOptions.REG_OPTION_VOLATILE, // 0x0001
Microsoft\Win32\RegistryValueKind.cs (6)
8
String =
Interop
.Advapi32.RegistryValues.REG_SZ,
9
ExpandString =
Interop
.Advapi32.RegistryValues.REG_EXPAND_SZ,
10
Binary =
Interop
.Advapi32.RegistryValues.REG_BINARY,
11
DWord =
Interop
.Advapi32.RegistryValues.REG_DWORD,
12
MultiString =
Interop
.Advapi32.RegistryValues.REG_MULTI_SZ,
13
QWord =
Interop
.Advapi32.RegistryValues.REG_QWORD,
Microsoft\Win32\RegistryView.cs (2)
9
Registry64 =
Interop
.Advapi32.RegistryView.KEY_WOW64_64KEY, // 0x0100 operate on the 64-bit registry view
10
Registry32 =
Interop
.Advapi32.RegistryView.KEY_WOW64_32KEY, // 0x0200 operate on the 32-bit registry view
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeRegistryHandle.cs (2)
37
Interop
.Advapi32.RegCloseKey(handle) ==
Interop
.Errors.ERROR_SUCCESS;
System\Security\AccessControl\RegistryRights.cs (10)
13
QueryValues =
Interop
.Advapi32.RegistryOperations.KEY_QUERY_VALUE, // 0x0001 query the values of a registry key
14
SetValue =
Interop
.Advapi32.RegistryOperations.KEY_SET_VALUE, // 0x0002 create, delete, or set a registry value
15
CreateSubKey =
Interop
.Advapi32.RegistryOperations.KEY_CREATE_SUB_KEY, // 0x0004 required to create a subkey of a specific key
16
EnumerateSubKeys =
Interop
.Advapi32.RegistryOperations.KEY_ENUMERATE_SUB_KEYS, // 0x0008 required to enumerate sub keys of a key
17
Notify =
Interop
.Advapi32.RegistryOperations.KEY_NOTIFY, // 0x0010 needed to request change notifications
18
CreateLink =
Interop
.Advapi32.RegistryOperations.KEY_CREATE_LINK, // 0x0020 reserved for system use
26
ReadKey =
Interop
.Advapi32.RegistryOperations.STANDARD_RIGHTS_READ | QueryValues | EnumerateSubKeys | Notify,
27
WriteKey =
Interop
.Advapi32.RegistryOperations.STANDARD_RIGHTS_WRITE | SetValue | CreateSubKey,
32
FullControl = 0xF003F |
Interop
.Advapi32.RegistryOperations.STANDARD_RIGHTS_READ |
Interop
.Advapi32.RegistryOperations.STANDARD_RIGHTS_WRITE
System\Security\AccessControl\RegistrySecurity.cs (3)
104
case
Interop
.Errors.ERROR_FILE_NOT_FOUND:
108
case
Interop
.Errors.ERROR_INVALID_NAME:
112
case
Interop
.Errors.ERROR_INVALID_HANDLE: