Needed for Infinity Nikki.
From: Tim Clem tclem@codeweavers.com
And test for its existence. --- dlls/wbemprox/builtin.c | 2 +- dlls/wbemprox/tests/query.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 1291bd8b617..f3461cb4b2c 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -3263,7 +3263,7 @@ 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->partnumber = L""; + rec->partnumber = L"WINE1234-ABCD"; rec->serial = L""; 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..a1f3e6a7cb8 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -1689,6 +1689,7 @@ static void test_Win32_PhysicalMemory( IWbemServices *services ) 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_BSTR, CIM_STRING );
type = 0xdeadbeef; VariantInit( &val );
From: Tim Clem tclem@codeweavers.com
--- dlls/wbemprox/builtin.c | 6 ++++++ dlls/wbemprox/tests/query.c | 2 ++ 2 files changed, 8 insertions(+)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index f3461cb4b2c..9c59e8b5ae3 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_UINT16 }, }; 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; + UINT16 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"WINE1234-ABCD"; 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 a1f3e6a7cb8..309236b167f 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -1688,8 +1688,10 @@ 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 ); check_property( obj, L"PartNumber", VT_BSTR, CIM_STRING ); + check_property( obj, L"Speed", VT_I4, CIM_UINT16 );
type = 0xdeadbeef; VariantInit( &val );
Huh... the situation must be more complicated on native than wmic let on. I'll fix this up.
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?