[PATCH] wbemprox: Add more Win32_PhysicalMemory properties.

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue Jul 7 02:49:15 CDT 2020


Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/wbemprox/builtin.c     | 15 +++++++++++++--
 dlls/wbemprox/tests/query.c |  4 ++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 2ff3131936..957dbe53ab 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -270,12 +270,15 @@ static const struct column col_physicalmedia[] =
 };
 static const struct column col_physicalmemory[] =
 {
+    { L"BankLabel",            CIM_STRING },
     { L"Capacity",             CIM_UINT64 },
+    { L"Caption",              CIM_STRING },
     { L"ConfiguredClockSpeed", CIM_UINT32 },
     { L"DeviceLocator",        CIM_STRING },
     { L"FormFactor",           CIM_UINT16 },
     { L"MemoryType",           CIM_UINT16 },
     { L"PartNumber",           CIM_STRING },
+    { L"SerialNumber",         CIM_STRING },
 };
 static const struct column col_pnpentity[] =
 {
@@ -376,6 +379,7 @@ static const struct column col_sounddevice[] =
     { L"Name",        CIM_STRING },
     { L"ProductName", CIM_STRING },
     { L"StatusInfo",  CIM_UINT16 },
+    { L"Manufacturer", CIM_STRING },
 };
 static const struct column col_stdregprov[] =
 {
@@ -655,12 +659,15 @@ struct record_physicalmedia
 };
 struct record_physicalmemory
 {
+    const WCHAR *banklabel;
     UINT64       capacity;
+    const WCHAR *caption;
     UINT32       configuredclockspeed;
     const WCHAR *devicelocator;
     UINT16       formfactor;
     UINT16       memorytype;
     const WCHAR *partnumber;
+    const WCHAR *serial;
 };
 struct record_pnpentity
 {
@@ -761,6 +768,7 @@ struct record_sounddevice
     const WCHAR *name;
     const WCHAR *productname;
     UINT16       statusinfo;
+    const WCHAR *manufacturer;
 };
 struct record_stdregprov
 {
@@ -878,7 +886,7 @@ static const struct record_quickfixengineering data_quickfixengineering[] =
 };
 static const struct record_sounddevice data_sounddevice[] =
 {
-    { L"Wine Audio Device", L"Wine Audio Device", 3 /* enabled */ }
+    { L"Wine Audio Device", L"Wine Audio Device", 3 /* enabled */, L"The Wine Project" }
 };
 static const struct record_stdregprov data_stdregprov[] =
 {
@@ -2905,12 +2913,15 @@ static enum fill_status fill_physicalmemory( struct table *table, const struct e
     if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
 
     rec = (struct record_physicalmemory *)table->data;
+    rec->banklabel            = L"BANK 0";
     rec->capacity             = get_total_physical_memory();
-    rec->configuredclockspeed = 0;
+    rec->caption              = L"Physical Memory";
+    rec->configuredclockspeed = 1600;
     rec->devicelocator        = L"DIMM 0";
     rec->formfactor           = 8; /* DIMM */
     rec->memorytype           = 9; /* RAM */
     rec->partnumber           = NULL;
+    rec->serial               = NULL;
     if (!match_row( table, row, cond, &status )) free_row_values( table, row );
     else row++;
 
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index 578e9308df..7dcfd35e93 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -1159,10 +1159,14 @@ static void test_Win32_PhysicalMemory( IWbemServices *services )
 
     if (count > 0)
     {
+        check_property( obj, L"BankLabel", VT_BSTR, CIM_STRING );
         check_property( obj, L"Capacity", VT_BSTR, CIM_UINT64 );
+        check_property( obj, L"Caption", VT_BSTR, CIM_STRING );
         check_property( obj, L"DeviceLocator", VT_BSTR, CIM_STRING );
         check_property( obj, L"FormFactor", VT_I4, CIM_UINT16 );
         check_property( obj, L"MemoryType", VT_I4, CIM_UINT16 );
+        check_property( obj, L"PartNumber", VT_NULL, CIM_STRING );
+        check_property( obj, L"SerialNumber", VT_NULL, CIM_STRING );
         IWbemClassObject_Release( obj );
     }
     IEnumWbemClassObject_Release( result );
-- 
2.27.0




More information about the wine-devel mailing list