Alistair Leslie-Hughes : wbemprox: Add more Win32_PhysicalMemory properties.

Alexandre Julliard julliard at winehq.org
Tue Jul 7 15:47:07 CDT 2020


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Tue Jul  7 17:54:22 2020 +1000

wbemprox: Add more Win32_PhysicalMemory properties.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wbemprox/builtin.c     | 11 ++++++++++-
 dlls/wbemprox/tests/query.c |  4 ++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 2ff3131936..a94d41bfc4 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[] =
 {
@@ -655,12 +658,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
 {
@@ -2905,12 +2911,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 );




More information about the wine-cvs mailing list