[PATCH v2 0/1] MR7438: Draft: wbemprox: Add and adjust some Win32_PhysicalMemory properties
Needed for Infinity Nikki. -- v2: wbemprox: Add Manufacturer and Speed to Win32_PhysicalMemory. https://gitlab.winehq.org/wine/wine/-/merge_requests/7438
From: Tim Clem <tclem(a)codeweavers.com> --- dlls/wbemprox/builtin.c | 6 ++++++ dlls/wbemprox/tests/query.c | 1 + 2 files changed, 7 insertions(+) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 1291bd8b617..4cefc0c986e 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -294,9 +294,11 @@ static const struct column col_physicalmemory[] = { L"ConfiguredClockSpeed", CIM_UINT32 }, { L"DeviceLocator", CIM_STRING }, { L"FormFactor", CIM_UINT16 }, + { L"Manufacturer", CIM_STRING }, { L"MemoryType", CIM_UINT16 }, { L"PartNumber", CIM_STRING }, { L"SerialNumber", CIM_STRING }, + { L"Speed", CIM_UINT32 }, }; static const struct column col_physicalmemoryarray[] = { @@ -797,9 +799,11 @@ struct record_physicalmemory UINT32 configuredclockspeed; const WCHAR *devicelocator; UINT16 formfactor; + const WCHAR *manufacturer; UINT16 memorytype; const WCHAR *partnumber; const WCHAR *serial; + UINT32 speed; }; struct record_physicalmemoryarray { @@ -3263,8 +3267,10 @@ static enum fill_status fill_physicalmemory( struct table *table, const struct e rec->devicelocator = L"DIMM 0"; rec->formfactor = 8; /* DIMM */ rec->memorytype = 9; /* RAM */ + rec->manufacturer = L"Wine"; rec->partnumber = L""; rec->serial = L""; + rec->speed = 3200; 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 bff9b0f4ee1..2a8fc32020c 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -1688,6 +1688,7 @@ static void test_Win32_PhysicalMemory( IWbemServices *services ) 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"Manufacturer", VT_BSTR, CIM_STRING ); check_property( obj, L"MemoryType", VT_I4, CIM_UINT16 ); type = 0xdeadbeef; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7438
On Mon Mar 3 19:04:37 2025 +0000, Hans Leidekker wrote:
The tests are run on a VM where certain properties can be missing, especially when dealing with hardware objects like this one. Just omit the tests for PartNumber and Speed. The type for Speed should be UINT32/CIM_UINT32. Does the app fail because of that non-empty PartNumber? Thanks, fixed in v2. The game does not actually fail on an empty PartNumber, so I've removed that commit.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7438#note_96611
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7438
participants (3)
-
Hans Leidekker (@hans) -
Tim Clem -
Tim Clem (@tclem)