From bc07327c15d27360417811064fd218b8e0cd0001 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Mon, 5 Feb 2018 16:08:16 +0100 Subject: [PATCH] wbemprox: Add more Win32_BIOS properties. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/wbemprox/builtin.c | 10 +++++++++- dlls/wbemprox/tests/query.c | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index dd5b9ac9cfa..b699724a2d5 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -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[] = { diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index 7f2e864eea1..c2d0eba7922 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -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; @@ -367,6 +369,22 @@ static void test_Win32_Bios( IWbemServices *services ) 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 ); ok( hr == S_OK, "failed to get version %08x\n", hr ); ok( V_VT( &val ) == VT_BSTR, "unexpected variant type 0x%x\n", V_VT( &val ) ); -- 2.11.4.GIT