wbemprox: Add more Win32_ComputerSystemProduct properties.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
89eaa4aa37
commit
7c0025b608
|
@ -331,6 +331,8 @@ static const WCHAR prop_servicetypeW[] =
|
||||||
{'S','e','r','v','i','c','e','T','y','p','e',0};
|
{'S','e','r','v','i','c','e','T','y','p','e',0};
|
||||||
static const WCHAR prop_settingidW[] =
|
static const WCHAR prop_settingidW[] =
|
||||||
{'S','e','t','t','i','n','g','I','D',0};
|
{'S','e','t','t','i','n','g','I','D',0};
|
||||||
|
static const WCHAR prop_skunumberW[] =
|
||||||
|
{'S','K','U','N','u','m','b','e','r',0};
|
||||||
static const WCHAR prop_smbiosbiosversionW[] =
|
static const WCHAR prop_smbiosbiosversionW[] =
|
||||||
{'S','M','B','I','O','S','B','I','O','S','V','e','r','s','i','o','n',0};
|
{'S','M','B','I','O','S','B','I','O','S','V','e','r','s','i','o','n',0};
|
||||||
static const WCHAR prop_startmodeW[] =
|
static const WCHAR prop_startmodeW[] =
|
||||||
|
@ -377,6 +379,8 @@ static const WCHAR prop_uuidW[] =
|
||||||
{'U','U','I','D',0};
|
{'U','U','I','D',0};
|
||||||
static const WCHAR prop_varianttypeW[] =
|
static const WCHAR prop_varianttypeW[] =
|
||||||
{'V','a','r','i','a','n','t','T','y','p','e',0};
|
{'V','a','r','i','a','n','t','T','y','p','e',0};
|
||||||
|
static const WCHAR prop_vendorW[] =
|
||||||
|
{'V','e','n','d','o','r',0};
|
||||||
static const WCHAR prop_versionW[] =
|
static const WCHAR prop_versionW[] =
|
||||||
{'V','e','r','s','i','o','n',0};
|
{'V','e','r','s','i','o','n',0};
|
||||||
static const WCHAR prop_videoarchitectureW[] =
|
static const WCHAR prop_videoarchitectureW[] =
|
||||||
|
@ -440,7 +444,11 @@ static const struct column col_compsys[] =
|
||||||
static const struct column col_compsysproduct[] =
|
static const struct column col_compsysproduct[] =
|
||||||
{
|
{
|
||||||
{ prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY },
|
{ prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY },
|
||||||
{ prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC }
|
{ prop_nameW, CIM_STRING|COL_FLAG_KEY },
|
||||||
|
{ prop_skunumberW, CIM_STRING },
|
||||||
|
{ prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC },
|
||||||
|
{ prop_vendorW, CIM_STRING },
|
||||||
|
{ prop_versionW, CIM_STRING|COL_FLAG_KEY }
|
||||||
};
|
};
|
||||||
static const struct column col_datafile[] =
|
static const struct column col_datafile[] =
|
||||||
{
|
{
|
||||||
|
@ -738,9 +746,15 @@ static const WCHAR compsys_modelW[] =
|
||||||
{'W','i','n','e',0};
|
{'W','i','n','e',0};
|
||||||
static const WCHAR compsysproduct_identifyingnumberW[] =
|
static const WCHAR compsysproduct_identifyingnumberW[] =
|
||||||
{'0',0};
|
{'0',0};
|
||||||
|
static const WCHAR compsysproduct_nameW[] =
|
||||||
|
{'W','i','n','e',0};
|
||||||
static const WCHAR compsysproduct_uuidW[] =
|
static const WCHAR compsysproduct_uuidW[] =
|
||||||
{'d','e','a','d','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-',
|
{'d','e','a','d','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-',
|
||||||
'd','e','a','d','d','e','a','d','d','e','a','d',0};
|
'd','e','a','d','d','e','a','d','d','e','a','d',0};
|
||||||
|
static const WCHAR compsysproduct_vendorW[] =
|
||||||
|
{'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0};
|
||||||
|
static const WCHAR compsysproduct_versionW[] =
|
||||||
|
{'1','.','0',0};
|
||||||
static const WCHAR diskdrive_interfacetypeW[] =
|
static const WCHAR diskdrive_interfacetypeW[] =
|
||||||
{'I','D','E',0};
|
{'I','D','E',0};
|
||||||
static const WCHAR diskdrive_manufacturerW[] =
|
static const WCHAR diskdrive_manufacturerW[] =
|
||||||
|
@ -830,7 +844,11 @@ struct record_computersystem
|
||||||
struct record_computersystemproduct
|
struct record_computersystemproduct
|
||||||
{
|
{
|
||||||
const WCHAR *identifyingnumber;
|
const WCHAR *identifyingnumber;
|
||||||
|
const WCHAR *name;
|
||||||
|
const WCHAR *skunumber;
|
||||||
const WCHAR *uuid;
|
const WCHAR *uuid;
|
||||||
|
const WCHAR *vendor;
|
||||||
|
const WCHAR *version;
|
||||||
};
|
};
|
||||||
struct record_datafile
|
struct record_datafile
|
||||||
{
|
{
|
||||||
|
@ -1417,7 +1435,11 @@ static enum fill_status fill_compsysproduct( struct table *table, const struct e
|
||||||
|
|
||||||
rec = (struct record_computersystemproduct *)table->data;
|
rec = (struct record_computersystemproduct *)table->data;
|
||||||
rec->identifyingnumber = compsysproduct_identifyingnumberW;
|
rec->identifyingnumber = compsysproduct_identifyingnumberW;
|
||||||
|
rec->name = compsysproduct_nameW;
|
||||||
|
rec->skunumber = NULL;
|
||||||
rec->uuid = get_compsysproduct_uuid();
|
rec->uuid = get_compsysproduct_uuid();
|
||||||
|
rec->vendor = compsysproduct_vendorW;
|
||||||
|
rec->version = compsysproduct_versionW;
|
||||||
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++;
|
||||||
|
|
||||||
|
|
|
@ -1223,7 +1223,18 @@ static void test_OperatingSystem( IWbemServices *services )
|
||||||
|
|
||||||
static void test_ComputerSystemProduct( IWbemServices *services )
|
static void test_ComputerSystemProduct( IWbemServices *services )
|
||||||
{
|
{
|
||||||
static const WCHAR uuidW[] = {'U','U','I','D',0};
|
static const WCHAR identifyingnumberW[] =
|
||||||
|
{'I','d','e','n','t','i','f','y','i','n','g','N','u','m','b','e','r',0};
|
||||||
|
static const WCHAR nameW[] =
|
||||||
|
{'N','a','m','e',0};
|
||||||
|
static const WCHAR skunumberW[] =
|
||||||
|
{'S','K','U','N','u','m','b','e','r',0};
|
||||||
|
static const WCHAR uuidW[] =
|
||||||
|
{'U','U','I','D',0};
|
||||||
|
static const WCHAR vendorW[] =
|
||||||
|
{'V','e','n','d','o','r',0};
|
||||||
|
static const WCHAR versionW[] =
|
||||||
|
{'V','e','r','s','i','o','n',0};
|
||||||
static const WCHAR queryW[] =
|
static const WCHAR queryW[] =
|
||||||
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
|
{'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
|
||||||
'C','o','m','p','u','t','e','r','S','y','s','t','e','m','P','r','o','d','u','c','t',0};
|
'C','o','m','p','u','t','e','r','S','y','s','t','e','m','P','r','o','d','u','c','t',0};
|
||||||
|
@ -1245,15 +1256,59 @@ static void test_ComputerSystemProduct( IWbemServices *services )
|
||||||
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
|
hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
|
||||||
ok( hr == S_OK, "got %08x\n", hr );
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
|
||||||
|
type = 0xdeadbeef;
|
||||||
|
VariantInit( &value );
|
||||||
|
hr = IWbemClassObject_Get( obj, identifyingnumberW, 0, &value, &type, NULL );
|
||||||
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
ok( V_VT( &value ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &value ) );
|
||||||
|
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
|
||||||
|
trace( "identifyingnumber %s\n", wine_dbgstr_w(V_BSTR(&value)) );
|
||||||
|
VariantClear( &value );
|
||||||
|
|
||||||
|
type = 0xdeadbeef;
|
||||||
|
VariantInit( &value );
|
||||||
|
hr = IWbemClassObject_Get( obj, nameW, 0, &value, &type, NULL );
|
||||||
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
ok( V_VT( &value ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &value ) );
|
||||||
|
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
|
||||||
|
trace( "name %s\n", wine_dbgstr_w(V_BSTR(&value)) );
|
||||||
|
VariantClear( &value );
|
||||||
|
|
||||||
|
type = 0xdeadbeef;
|
||||||
|
VariantInit( &value );
|
||||||
|
hr = IWbemClassObject_Get( obj, skunumberW, 0, &value, &type, NULL );
|
||||||
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
ok( V_VT( &value ) == VT_NULL, "unexpected variant type 0x%x\n", V_VT( &value ) );
|
||||||
|
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
|
||||||
|
VariantClear( &value );
|
||||||
|
|
||||||
type = 0xdeadbeef;
|
type = 0xdeadbeef;
|
||||||
VariantInit( &value );
|
VariantInit( &value );
|
||||||
hr = IWbemClassObject_Get( obj, uuidW, 0, &value, &type, NULL );
|
hr = IWbemClassObject_Get( obj, uuidW, 0, &value, &type, NULL );
|
||||||
ok( hr == S_OK, "failed to get computer name %08x\n", hr );
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
ok( V_VT( &value ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &value ) );
|
ok( V_VT( &value ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &value ) );
|
||||||
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
|
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
|
||||||
trace( "uuid %s\n", wine_dbgstr_w(V_BSTR(&value)) );
|
trace( "uuid %s\n", wine_dbgstr_w(V_BSTR(&value)) );
|
||||||
VariantClear( &value );
|
VariantClear( &value );
|
||||||
|
|
||||||
|
type = 0xdeadbeef;
|
||||||
|
VariantInit( &value );
|
||||||
|
hr = IWbemClassObject_Get( obj, vendorW, 0, &value, &type, NULL );
|
||||||
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
ok( V_VT( &value ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &value ) );
|
||||||
|
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
|
||||||
|
trace( "vendor %s\n", wine_dbgstr_w(V_BSTR(&value)) );
|
||||||
|
VariantClear( &value );
|
||||||
|
|
||||||
|
type = 0xdeadbeef;
|
||||||
|
VariantInit( &value );
|
||||||
|
hr = IWbemClassObject_Get( obj, versionW, 0, &value, &type, NULL );
|
||||||
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
ok( V_VT( &value ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &value ) );
|
||||||
|
ok( type == CIM_STRING, "unexpected type 0x%x\n", type );
|
||||||
|
trace( "version %s\n", wine_dbgstr_w(V_BSTR(&value)) );
|
||||||
|
VariantClear( &value );
|
||||||
|
|
||||||
IWbemClassObject_Release( obj );
|
IWbemClassObject_Release( obj );
|
||||||
IEnumWbemClassObject_Release( result );
|
IEnumWbemClassObject_Release( result );
|
||||||
SysFreeString( query );
|
SysFreeString( query );
|
||||||
|
|
Loading…
Reference in New Issue