Commit ba8e416e authored by Louis Lenders's avatar Louis Lenders Committed by Alexandre Julliard

wbemprox: Add SystemType property to Win32_Computersystem.

parent 789eecc6
......@@ -105,6 +105,7 @@ static const struct column col_compsys[] =
{ L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
{ L"NumberOfLogicalProcessors", CIM_UINT32 },
{ L"NumberOfProcessors", CIM_UINT32 },
{ L"SystemType", CIM_STRING },
{ L"TotalPhysicalMemory", CIM_UINT64 },
{ L"UserName", CIM_STRING|COL_FLAG_DYNAMIC },
};
......@@ -541,6 +542,7 @@ struct record_computersystem
const WCHAR *name;
UINT32 num_logical_processors;
UINT32 num_processors;
const WCHAR *systemtype;
UINT64 total_physical_memory;
const WCHAR *username;
};
......@@ -1580,6 +1582,14 @@ static WCHAR *get_computername(void)
return ret;
}
static const WCHAR *get_systemtype(void)
{
SYSTEM_INFO info;
GetNativeSystemInfo( &info );
if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return L"x64 based PC";
return L"x86 based PC";
}
static WCHAR *get_username(void)
{
WCHAR *ret;
......@@ -1614,6 +1624,7 @@ static enum fill_status fill_compsys( struct table *table, const struct expr *co
rec->model = L"Wine";
rec->name = get_computername();
rec->num_logical_processors = get_logical_processor_count( NULL, &rec->num_processors );
rec->systemtype = get_systemtype();
rec->total_physical_memory = get_total_physical_memory();
rec->username = get_username();
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
......
......@@ -752,6 +752,7 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
}
check_property( obj, L"NumberOfProcessors", VT_I4, CIM_UINT32 );
check_property( obj, L"SystemType", VT_BSTR, CIM_STRING );
type = 0xdeadbeef;
VariantInit( &value );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment