[PATCH 2/2] wbemprox: Support using record in IWbemClassObject Next

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Wed May 26 00:59:27 CDT 2021


Makes the code the same as class_object_Get.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/wbemprox/class.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c
index 2f7752e8671..3b7bc066aea 100644
--- a/dlls/wbemprox/class.c
+++ b/dlls/wbemprox/class.c
@@ -546,7 +546,17 @@ static HRESULT WINAPI class_object_Next(
         if (is_method( table, i )) continue;
         if (!is_result_prop( view, table->columns[i].name )) continue;
         if (!(prop = SysAllocString( table->columns[i].name ))) return E_OUTOFMEMORY;
-        if ((hr = get_propval( view, obj->index, prop, pVal, pType, plFlavor )) != S_OK)
+        if (obj->record)
+        {
+            UINT index;
+
+            if ((hr = get_column_index( table, table->columns[i].name, &index )) == S_OK)
+                hr = record_get_value( obj->record, index, pVal, pType );
+        }
+        else
+            hr = get_propval( view, obj->index, prop, pVal, pType, plFlavor );
+
+        if (FAILED(hr))
         {
             SysFreeString( prop );
             return hr;
-- 
2.30.2




More information about the wine-devel mailing list