Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnipik <anirudhagnihotry098@gmail.com>2018-08-27 20:45:02 +0300
committerAnirudh Agnihotry <anirudhagnihotry098@gmail.com>2018-08-27 22:13:42 +0300
commit98081dfb35d0722e6440dbabe9599b0cdad9aed1 (patch)
tree9892630947409979c043ce060b52f0a5100654ae
parent17298c4d9ce704eef0bfbb662706ece7ddab5970 (diff)
using advapi32 instead of kernel32
-rw-r--r--src/System.Private.CoreLib/src/Microsoft/Win32/RegistryKey.Windows.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/System.Private.CoreLib/src/Microsoft/Win32/RegistryKey.Windows.cs b/src/System.Private.CoreLib/src/Microsoft/Win32/RegistryKey.Windows.cs
index afafd24e9..492247757 100644
--- a/src/System.Private.CoreLib/src/Microsoft/Win32/RegistryKey.Windows.cs
+++ b/src/System.Private.CoreLib/src/Microsoft/Win32/RegistryKey.Windows.cs
@@ -441,21 +441,21 @@ namespace Microsoft.Win32
switch (type)
{
- case Interop.Kernel32.RegistryValues.REG_NONE:
- case Interop.Kernel32.RegistryValues.REG_DWORD_BIG_ENDIAN:
- case Interop.Kernel32.RegistryValues.REG_BINARY:
+ case Interop.Advapi32.RegistryValues.REG_NONE:
+ case Interop.Advapi32.RegistryValues.REG_DWORD_BIG_ENDIAN:
+ case Interop.Advapi32.RegistryValues.REG_BINARY:
{
byte[] blob = new byte[datasize];
ret = Interop.mincore.RegQueryValueEx(_hkey, name, null, ref type, blob, ref datasize);
data = blob;
}
break;
- case Interop.Kernel32.RegistryValues.REG_QWORD:
+ case Interop.Advapi32.RegistryValues.REG_QWORD:
{ // also REG_QWORD_LITTLE_ENDIAN
if (datasize > 8)
{
// prevent an AV in the edge case that datasize is larger than sizeof(long)
- goto case Interop.Kernel32.RegistryValues.REG_BINARY;
+ goto case Interop.Advapi32.RegistryValues.REG_BINARY;
}
long blob = 0;
Debug.Assert(datasize == 8, "datasize==8");
@@ -465,12 +465,12 @@ namespace Microsoft.Win32
data = blob;
}
break;
- case Interop.Kernel32.RegistryValues.REG_DWORD:
+ case Interop.Advapi32.RegistryValues.REG_DWORD:
{ // also REG_DWORD_LITTLE_ENDIAN
if (datasize > 4)
{
// prevent an AV in the edge case that datasize is larger than sizeof(int)
- goto case Interop.Kernel32.RegistryValues.REG_QWORD;
+ goto case Interop.Advapi32.RegistryValues.REG_QWORD;
}
int blob = 0;
Debug.Assert(datasize == 4, "datasize==4");
@@ -481,7 +481,7 @@ namespace Microsoft.Win32
}
break;
- case Interop.Kernel32.RegistryValues.REG_SZ:
+ case Interop.Advapi32.RegistryValues.REG_SZ:
{
if (datasize % 2 == 1)
{
@@ -511,7 +511,7 @@ namespace Microsoft.Win32
}
break;
- case Interop.Kernel32.RegistryValues.REG_EXPAND_SZ:
+ case Interop.Advapi32.RegistryValues.REG_EXPAND_SZ:
{
if (datasize % 2 == 1)
{
@@ -546,7 +546,7 @@ namespace Microsoft.Win32
}
}
break;
- case Interop.Kernel32.RegistryValues.REG_MULTI_SZ:
+ case Interop.Advapi32.RegistryValues.REG_MULTI_SZ:
{
if (datasize % 2 == 1)
{
@@ -622,7 +622,7 @@ namespace Microsoft.Win32
data = strings;
}
break;
- case Interop.Kernel32.RegistryValues.REG_LINK:
+ case Interop.Advapi32.RegistryValues.REG_LINK:
default:
break;
}
@@ -641,7 +641,7 @@ namespace Microsoft.Win32
}
return
- type == Interop.Kernel32.RegistryValues.REG_NONE ? RegistryValueKind.None :
+ type == Interop.Advapi32.RegistryValues.REG_NONE ? RegistryValueKind.None :
!Enum.IsDefined(typeof(RegistryValueKind), type) ? RegistryValueKind.Unknown :
(RegistryValueKind)type;
}