Hans Leidekker : wbemprox: Add support for boolean values in get_value_bstr .

Alexandre Julliard julliard at winehq.org
Tue Sep 4 12:38:36 CDT 2012


Module: wine
Branch: master
Commit: 4e2c2e5a6451314cac87289818db3253dc1becc1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4e2c2e5a6451314cac87289818db3253dc1becc1

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Sep  4 13:49:24 2012 +0200

wbemprox: Add support for boolean values in get_value_bstr.

---

 dlls/wbemprox/table.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c
index 6b584ff..c6dc845 100644
--- a/dlls/wbemprox/table.c
+++ b/dlls/wbemprox/table.c
@@ -144,6 +144,8 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column )
     static const WCHAR fmt_signed64W[] = {'%','I','6','4','d',0};
     static const WCHAR fmt_unsigned64W[] = {'%','I','6','4','u',0};
     static const WCHAR fmt_strW[] = {'\"','%','s','\"',0};
+    static const WCHAR trueW[] = {'T','R','U','E',0};
+    static const WCHAR falseW[] = {'F','A','L','S','E',0};
     LONGLONG val;
     BSTR ret;
     WCHAR number[22];
@@ -158,6 +160,10 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column )
 
     switch (table->columns[column].type & COL_TYPE_MASK)
     {
+    case CIM_BOOLEAN:
+        if (val) return SysAllocString( trueW );
+        else return SysAllocString( falseW );
+
     case CIM_DATETIME:
     case CIM_STRING:
         len = strlenW( (const WCHAR *)(INT_PTR)val ) + 2;




More information about the wine-cvs mailing list