From 59b647a3e85999379c97534bfd9a6472babe50d7 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Wed, 28 Aug 2019 14:14:27 +0200 Subject: [PATCH] wbemprox: Support boolean qualifier values. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/wbemprox/builtin.c | 18 +++++++++++------- dlls/wbemprox/qualifier.c | 4 ++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 3d2a0679af2..bbc96bf1ab8 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -137,6 +137,8 @@ static const WCHAR prop_availabilityW[] = {'A','v','a','i','l','a','b','i','l','i','t','y',0}; static const WCHAR prop_binaryrepresentationW[] = {'B','i','n','a','r','y','R','e','p','r','e','s','e','n','t','a','t','i','o','n',0}; +static const WCHAR prop_boolvalueW[] = + {'B','o','o','l','V','a','l','u','e',0}; static const WCHAR prop_bootableW[] = {'B','o','o','t','a','b','l','e',0}; static const WCHAR prop_bootpartitionW[] = @@ -667,13 +669,14 @@ static const struct column col_processor[] = }; static const struct column col_qualifier[] = { - { prop_classW, CIM_STRING }, - { prop_memberW, CIM_STRING }, - { prop_typeW, CIM_UINT32 }, - { prop_flavorW, CIM_SINT32 }, - { prop_nameW, CIM_STRING }, - { prop_intvalueW, CIM_SINT32 }, - { prop_strvalueW, CIM_STRING } + { prop_classW, CIM_STRING }, + { prop_memberW, CIM_STRING }, + { prop_typeW, CIM_UINT32 }, + { prop_flavorW, CIM_SINT32 }, + { prop_nameW, CIM_STRING }, + { prop_intvalueW, CIM_SINT32 }, + { prop_strvalueW, CIM_STRING }, + { prop_boolvalueW, CIM_BOOLEAN } }; static const struct column col_service[] = { @@ -1101,6 +1104,7 @@ struct record_qualifier const WCHAR *name; INT32 intvalue; const WCHAR *strvalue; + int boolvalue; }; struct record_service { diff --git a/dlls/wbemprox/qualifier.c b/dlls/wbemprox/qualifier.c index 9a4f74b978a..aa644812f4a 100644 --- a/dlls/wbemprox/qualifier.c +++ b/dlls/wbemprox/qualifier.c @@ -126,6 +126,7 @@ static HRESULT get_qualifier_value( const WCHAR *class, const WCHAR *member, con static const WCHAR qualifiersW[] = {'_','_','Q','U','A','L','I','F','I','E','R','S',0}; static const WCHAR intvalueW[] = {'I','n','t','e','g','e','r','V','a','l','u','e',0}; static const WCHAR strvalueW[] = {'S','t','r','i','n','g','V','a','l','u','e',0}; + static const WCHAR boolvalueW[] = {'B','o','o','l','V','a','l','u','e',0}; static const WCHAR flavorW[] = {'F','l','a','v','o','r',0}; static const WCHAR typeW[] = {'T','y','p','e',0}; IEnumWbemClassObject *iter; @@ -156,6 +157,9 @@ static HRESULT get_qualifier_value( const WCHAR *class, const WCHAR *member, con case CIM_SINT32: hr = IWbemClassObject_Get( obj, intvalueW, 0, val, NULL, NULL ); break; + case CIM_BOOLEAN: + hr = IWbemClassObject_Get( obj, boolvalueW, 0, val, NULL, NULL ); + break; default: ERR("unhandled type %u\n", V_UI4( &var )); break;