wbemprox: Implement Win32_OperatingSystem.OperatingSystemSKU.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46895 Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
66b2b3ea68
commit
5b2113de2d
|
@ -314,6 +314,8 @@ static const WCHAR prop_numlogicalprocessorsW[] =
|
|||
{'N','u','m','b','e','r','O','f','L','o','g','i','c','a','l','P','r','o','c','e','s','s','o','r','s',0};
|
||||
static const WCHAR prop_numprocessorsW[] =
|
||||
{'N','u','m','b','e','r','O','f','P','r','o','c','e','s','s','o','r','s',0};
|
||||
static const WCHAR prop_operatingsystemskuW[] =
|
||||
{'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m','S','K','U',0};
|
||||
static const WCHAR prop_osarchitectureW[] =
|
||||
{'O','S','A','r','c','h','i','t','e','c','t','u','r','e',0};
|
||||
static const WCHAR prop_oslanguageW[] =
|
||||
|
@ -588,6 +590,7 @@ static const struct column col_os[] =
|
|||
{ prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC },
|
||||
{ prop_localeW, CIM_STRING|COL_FLAG_DYNAMIC },
|
||||
{ prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
|
||||
{ prop_operatingsystemskuW, CIM_UINT32, VT_I4 },
|
||||
{ prop_osarchitectureW, CIM_STRING },
|
||||
{ prop_oslanguageW, CIM_UINT32, VT_I4 },
|
||||
{ prop_osproductsuiteW, CIM_UINT32, VT_I4 },
|
||||
|
@ -1015,6 +1018,7 @@ struct record_operatingsystem
|
|||
const WCHAR *localdatetime;
|
||||
const WCHAR *locale;
|
||||
const WCHAR *name;
|
||||
UINT32 operatingsystemsku;
|
||||
const WCHAR *osarchitecture;
|
||||
UINT32 oslanguage;
|
||||
UINT32 osproductsuite;
|
||||
|
@ -3197,6 +3201,12 @@ static WCHAR *get_osversion( OSVERSIONINFOEXW *ver )
|
|||
if (ret) sprintfW( ret, fmtW, ver->dwMajorVersion, ver->dwMinorVersion, ver->dwBuildNumber );
|
||||
return ret;
|
||||
}
|
||||
static DWORD get_operatingsystemsku(void)
|
||||
{
|
||||
DWORD ret = PRODUCT_UNDEFINED;
|
||||
GetProductInfo( 6, 0, 0, 0, &ret );
|
||||
return ret;
|
||||
}
|
||||
|
||||
static enum fill_status fill_os( struct table *table, const struct expr *cond )
|
||||
{
|
||||
|
@ -3222,6 +3232,7 @@ static enum fill_status fill_os( struct table *table, const struct expr *cond )
|
|||
rec->localdatetime = get_localdatetime();
|
||||
rec->locale = get_locale();
|
||||
rec->name = get_osname( rec->caption );
|
||||
rec->operatingsystemsku = get_operatingsystemsku();
|
||||
rec->osarchitecture = get_osarchitecture();
|
||||
rec->oslanguage = GetSystemDefaultLangID();
|
||||
rec->osproductsuite = 2461140; /* Windows XP Professional */
|
||||
|
|
|
@ -1234,6 +1234,7 @@ static void test_Win32_OperatingSystem( IWbemServices *services )
|
|||
static const WCHAR csdversionW[] = {'C','S','D','V','e','r','s','i','o','n',0};
|
||||
static const WCHAR freephysicalmemoryW[] = {'F','r','e','e','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
|
||||
static const WCHAR nameW[] = {'N','a','m','e',0};
|
||||
static const WCHAR operatingsystemskuW[] = {'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m','S','K','U',0};
|
||||
static const WCHAR osproductsuiteW[] = {'O','S','P','r','o','d','u','c','t','S','u','i','t','e',0};
|
||||
static const WCHAR ostypeW[] = {'O','S','T','y','p','e',0};
|
||||
static const WCHAR suitemaskW[] = {'S','u','i','t','e','M','a','s','k',0};
|
||||
|
@ -1313,6 +1314,18 @@ static void test_Win32_OperatingSystem( IWbemServices *services )
|
|||
trace( "name: %s\n", wine_dbgstr_w(V_BSTR( &val )) );
|
||||
VariantClear( &val );
|
||||
|
||||
type = 0xdeadbeef;
|
||||
VariantInit( &val );
|
||||
hr = IWbemClassObject_Get( obj, operatingsystemskuW, 0, &val, &type, NULL );
|
||||
ok( hr == S_OK || broken(hr == WBEM_E_NOT_FOUND) /* winxp */, "failed to get operatingsystemsku %08x\n", hr );
|
||||
if (hr == S_OK)
|
||||
{
|
||||
ok( V_VT( &val ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &val ) );
|
||||
ok( type == CIM_UINT32, "unexpected type 0x%x\n", type );
|
||||
trace( "operatingsystemsku: %08x\n", V_I4( &val ) );
|
||||
VariantClear( &val );
|
||||
}
|
||||
|
||||
type = 0xdeadbeef;
|
||||
VariantInit( &val );
|
||||
hr = IWbemClassObject_Get( obj, osproductsuiteW, 0, &val, &type, NULL );
|
||||
|
|
Loading…
Reference in New Issue