Nikolay Sivov : wbemprox: Handle __ProviderArchitecture in EnumValues().

Alexandre Julliard julliard at winehq.org
Wed Mar 3 15:47:29 CST 2021


Module: wine
Branch: master
Commit: 045c4a5edbef85863db31d78cd62f1403a9f9633
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=045c4a5edbef85863db31d78cd62f1403a9f9633

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Mar  3 09:05:56 2021 +0300

wbemprox: Handle __ProviderArchitecture in EnumValues().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wbemprox/reg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/wbemprox/reg.c b/dlls/wbemprox/reg.c
index 1a963b0754b..59f94abfc4a 100644
--- a/dlls/wbemprox/reg.c
+++ b/dlls/wbemprox/reg.c
@@ -270,7 +270,8 @@ done:
     return hr;
 }
 
-static HRESULT enum_values( HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *types, VARIANT *retval )
+static HRESULT enum_values( HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *types, IWbemContext *context,
+        VARIANT *retval )
 {
     HKEY hkey = NULL;
     HRESULT hr = S_OK;
@@ -281,7 +282,7 @@ static HRESULT enum_values( HKEY root, const WCHAR *subkey, VARIANT *names, VARI
 
     TRACE("%p, %s\n", root, debugstr_w(subkey));
 
-    if ((res = RegOpenKeyExW( root, subkey, 0, KEY_QUERY_VALUE, &hkey ))) goto done;
+    if ((res = RegOpenKeyExW( root, subkey, 0, KEY_QUERY_VALUE | reg_get_access_mask( context ), &hkey ))) goto done;
     if ((res = RegQueryInfoKeyW( hkey, NULL, NULL, NULL, NULL, NULL, NULL, &count, &buflen, NULL, NULL, NULL )))
         goto done;
 
@@ -356,7 +357,7 @@ HRESULT reg_enum_values( IWbemClassObject *obj, IWbemContext *context, IWbemClas
     }
     VariantInit( &names );
     VariantInit( &types );
-    hr = enum_values( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &types, &retval );
+    hr = enum_values( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &types, context, &retval );
     if (hr != S_OK) goto done;
     if (out_params)
     {




More information about the wine-cvs mailing list