[KERNEL32]: Don't hardcode flag values for NtOpenKey.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 30 Jun 2016 20:34:10 +0000 (20:34 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 30 Jun 2016 20:34:10 +0000 (20:34 +0000)
svn path=/trunk/; revision=71708

reactos/dll/win32/kernel32/client/appcache.c

index 97e8cf4..f5c9e9e 100644 (file)
@@ -44,7 +44,7 @@ IsShimInfrastructureDisabled(VOID)
     if (g_ShimsEnabled == -1)
     {
         /* Open the safe mode key */
     if (g_ShimsEnabled == -1)
     {
         /* Open the safe mode key */
-        Status = NtOpenKey(&KeyHandle, 1, &OptionKeyAttributes);
+        Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &OptionKeyAttributes);
         if (NT_SUCCESS(Status))
         {
             /* Check if this is safemode */
         if (NT_SUCCESS(Status))
         {
             /* Check if this is safemode */
@@ -66,7 +66,7 @@ IsShimInfrastructureDisabled(VOID)
             else
             {
                 /* Open the app compatibility engine settings key */
             else
             {
                 /* Open the app compatibility engine settings key */
-                Status = NtOpenKey(&KeyHandle, 1, &AppCompatKeyAttributes);
+                Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &AppCompatKeyAttributes);
                 if (NT_SUCCESS(Status))
                 {
                     /* Check if the app compat engine is turned off */
                 if (NT_SUCCESS(Status))
                 {
                     /* Check if the app compat engine is turned off */
@@ -88,7 +88,7 @@ IsShimInfrastructureDisabled(VOID)
                     else
                     {
                         /* Finally, open the app compatibility policy key */
                     else
                     {
                         /* Finally, open the app compatibility policy key */
-                        Status = NtOpenKey(&KeyHandle, 1, &PolicyKeyAttributes);
+                        Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &PolicyKeyAttributes);
                         if (NT_SUCCESS(Status))
                         {
                             /* Check if the system policy disables app compat */
                         if (NT_SUCCESS(Status))
                         {
                             /* Check if the system policy disables app compat */