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