Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=52887 Signed-off-by: Louis Lenders xerox.xerox2000x@gmail.com --- dlls/wbemprox/builtin.c | 18 +++++++++++------- dlls/wbemprox/tests/query.c | 1 + 2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index a0bd5b11f7f..cab598be5c6 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -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 }, }; @@ -537,6 +538,7 @@ struct record_computersystem const WCHAR *name; UINT32 num_logical_processors; UINT32 num_processors; + const WCHAR *systemtype; UINT64 total_physical_memory; const WCHAR *username; }; @@ -1568,6 +1570,14 @@ static WCHAR *get_computername(void) return ret; }
+static const WCHAR *get_osarchitecture(void) +{ + SYSTEM_INFO info; + GetNativeSystemInfo( &info ); + if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return L"64-bit"; + return L"32-bit"; +} + static WCHAR *get_username(void) { WCHAR *ret; @@ -1602,6 +1612,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 = !wcscmp( get_osarchitecture(), L"64-bit" ) ? L"x64 based PC" : L"x86 based PC"; rec->total_physical_memory = get_total_physical_memory(); rec->username = get_username(); if (!match_row( table, row, cond, &status )) free_row_values( table, row ); @@ -3288,13 +3299,6 @@ static void get_processor_manufacturer( WCHAR *manufacturer, UINT len )
regs_to_str( regs + 1, min( 12, len ), manufacturer ); } -static const WCHAR *get_osarchitecture(void) -{ - SYSTEM_INFO info; - GetNativeSystemInfo( &info ); - if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return L"64-bit"; - return L"32-bit"; -} static void get_processor_caption( WCHAR *caption, UINT len ) { const WCHAR *arch; diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index b46d1b1ad7b..aa6dc132ac6 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -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 );