wbemprox: Add more Win32_PhysicalMemory properties.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1ff8fe20bf
commit
fb7cc99f8a
|
@ -270,12 +270,15 @@ static const struct column col_physicalmedia[] =
|
||||||
};
|
};
|
||||||
static const struct column col_physicalmemory[] =
|
static const struct column col_physicalmemory[] =
|
||||||
{
|
{
|
||||||
|
{ L"BankLabel", CIM_STRING },
|
||||||
{ L"Capacity", CIM_UINT64 },
|
{ L"Capacity", CIM_UINT64 },
|
||||||
|
{ L"Caption", CIM_STRING },
|
||||||
{ L"ConfiguredClockSpeed", CIM_UINT32 },
|
{ L"ConfiguredClockSpeed", CIM_UINT32 },
|
||||||
{ L"DeviceLocator", CIM_STRING },
|
{ L"DeviceLocator", CIM_STRING },
|
||||||
{ L"FormFactor", CIM_UINT16 },
|
{ L"FormFactor", CIM_UINT16 },
|
||||||
{ L"MemoryType", CIM_UINT16 },
|
{ L"MemoryType", CIM_UINT16 },
|
||||||
{ L"PartNumber", CIM_STRING },
|
{ L"PartNumber", CIM_STRING },
|
||||||
|
{ L"SerialNumber", CIM_STRING },
|
||||||
};
|
};
|
||||||
static const struct column col_pnpentity[] =
|
static const struct column col_pnpentity[] =
|
||||||
{
|
{
|
||||||
|
@ -655,12 +658,15 @@ struct record_physicalmedia
|
||||||
};
|
};
|
||||||
struct record_physicalmemory
|
struct record_physicalmemory
|
||||||
{
|
{
|
||||||
|
const WCHAR *banklabel;
|
||||||
UINT64 capacity;
|
UINT64 capacity;
|
||||||
|
const WCHAR *caption;
|
||||||
UINT32 configuredclockspeed;
|
UINT32 configuredclockspeed;
|
||||||
const WCHAR *devicelocator;
|
const WCHAR *devicelocator;
|
||||||
UINT16 formfactor;
|
UINT16 formfactor;
|
||||||
UINT16 memorytype;
|
UINT16 memorytype;
|
||||||
const WCHAR *partnumber;
|
const WCHAR *partnumber;
|
||||||
|
const WCHAR *serial;
|
||||||
};
|
};
|
||||||
struct record_pnpentity
|
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;
|
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
|
||||||
|
|
||||||
rec = (struct record_physicalmemory *)table->data;
|
rec = (struct record_physicalmemory *)table->data;
|
||||||
|
rec->banklabel = L"BANK 0";
|
||||||
rec->capacity = get_total_physical_memory();
|
rec->capacity = get_total_physical_memory();
|
||||||
rec->configuredclockspeed = 0;
|
rec->caption = L"Physical Memory";
|
||||||
|
rec->configuredclockspeed = 1600;
|
||||||
rec->devicelocator = L"DIMM 0";
|
rec->devicelocator = L"DIMM 0";
|
||||||
rec->formfactor = 8; /* DIMM */
|
rec->formfactor = 8; /* DIMM */
|
||||||
rec->memorytype = 9; /* RAM */
|
rec->memorytype = 9; /* RAM */
|
||||||
rec->partnumber = NULL;
|
rec->partnumber = NULL;
|
||||||
|
rec->serial = NULL;
|
||||||
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
|
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
|
||||||
else row++;
|
else row++;
|
||||||
|
|
||||||
|
|
|
@ -1159,10 +1159,14 @@ static void test_Win32_PhysicalMemory( IWbemServices *services )
|
||||||
|
|
||||||
if (count > 0)
|
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"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"DeviceLocator", VT_BSTR, CIM_STRING );
|
||||||
check_property( obj, L"FormFactor", VT_I4, CIM_UINT16 );
|
check_property( obj, L"FormFactor", VT_I4, CIM_UINT16 );
|
||||||
check_property( obj, L"MemoryType", 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 );
|
IWbemClassObject_Release( obj );
|
||||||
}
|
}
|
||||||
IEnumWbemClassObject_Release( result );
|
IEnumWbemClassObject_Release( result );
|
||||||
|
|
Loading…
Reference in New Issue