wbemprox: Add more Win32_BIOS properties.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2018-02-05 16:08:16 +01:00 committed by Alexandre Julliard
parent 7c0025b608
commit bc07327c15
2 changed files with 27 additions and 1 deletions

View File

@ -335,6 +335,10 @@ static const WCHAR prop_skunumberW[] =
{'S','K','U','N','u','m','b','e','r',0};
static const WCHAR prop_smbiosbiosversionW[] =
{'S','M','B','I','O','S','B','I','O','S','V','e','r','s','i','o','n',0};
static const WCHAR prop_smbiosmajorversionW[] =
{'S','M','B','I','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_smbiosminorversionW[] =
{'S','M','B','I','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_startmodeW[] =
{'S','t','a','r','t','M','o','d','e',0};
static const WCHAR prop_sidW[] =
@ -418,6 +422,8 @@ static const struct column col_bios[] =
{ prop_releasedateW, CIM_DATETIME },
{ prop_serialnumberW, CIM_STRING },
{ prop_smbiosbiosversionW, CIM_STRING },
{ prop_smbiosmajorversionW, CIM_UINT16, VT_I4 },
{ prop_smbiosminorversionW, CIM_UINT16, VT_I4 },
{ prop_versionW, CIM_STRING|COL_FLAG_KEY }
};
static const struct column col_cdromdrive[] =
@ -818,6 +824,8 @@ struct record_bios
const WCHAR *releasedate;
const WCHAR *serialnumber;
const WCHAR *smbiosbiosversion;
UINT16 smbiosmajorversion;
UINT16 smbiosminorversion;
const WCHAR *version;
};
struct record_cdromdrive
@ -1113,7 +1121,7 @@ static const struct record_baseboard data_baseboard[] =
static const struct record_bios data_bios[] =
{
{ bios_descriptionW, NULL, bios_manufacturerW, bios_nameW, bios_releasedateW, bios_serialnumberW,
bios_smbiosbiosversionW, bios_versionW }
bios_smbiosbiosversionW, 1, 0, bios_versionW }
};
static const struct record_param data_param[] =
{

View File

@ -288,6 +288,8 @@ static void test_Win32_Bios( IWbemServices *services )
static const WCHAR releasedateW[] = {'R','e','l','e','a','s','e','D','a','t','e',0};
static const WCHAR serialnumberW[] = {'S','e','r','i','a','l','N','u','m','b','e','r',0};
static const WCHAR smbiosbiosversionW[] = {'S','M','B','I','O','S','B','I','O','S','V','e','r','s','i','o','n',0};
static const WCHAR smbiosmajorversionW[] = {'S','M','B','I','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0};
static const WCHAR smbiosminorversionW[] = {'S','M','B','I','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0};
static const WCHAR versionW[] = {'V','e','r','s','i','o','n',0};
BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
IEnumWbemClassObject *result;
@ -365,6 +367,22 @@ static void test_Win32_Bios( IWbemServices *services )
trace( "bios version: %s\n", wine_dbgstr_w(V_BSTR( &val )) );
VariantClear( &val );
type = 0xdeadbeef;
VariantInit( &val );
hr = IWbemClassObject_Get( obj, smbiosmajorversionW, 0, &val, &type, NULL );
ok( hr == S_OK, "failed to get bios major version %08x\n", hr );
ok( V_VT( &val ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_UINT16, "unexpected type 0x%x\n", type );
trace( "bios major version: %u\n", V_I4( &val ) );
type = 0xdeadbeef;
VariantInit( &val );
hr = IWbemClassObject_Get( obj, smbiosminorversionW, 0, &val, &type, NULL );
ok( hr == S_OK, "failed to get bios minor version %08x\n", hr );
ok( V_VT( &val ) == VT_I4, "unexpected variant type 0x%x\n", V_VT( &val ) );
ok( type == CIM_UINT16, "unexpected type 0x%x\n", type );
trace( "bios minor version: %u\n", V_I4( &val ) );
type = 0xdeadbeef;
VariantInit( &val );
hr = IWbemClassObject_Get( obj, versionW, 0, &val, &type, NULL );