Commit cd5cad69 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemprox: Return a null variant instead of an empty string if the property isn't set.

parent 5acdba54
......@@ -728,6 +728,9 @@ static void set_variant( VARTYPE vartype, LONGLONG val, BSTR val_bstr, VARIANT *
V_VT( ret ) = VT_UI4;
V_UI4( ret ) = val;
return;
case VT_NULL:
V_VT( ret ) = VT_NULL;
return;
default:
ERR("unhandled variant type %u\n", vartype);
return;
......@@ -758,8 +761,13 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
{
case CIM_STRING:
case CIM_DATETIME:
vartype = VT_BSTR;
val_bstr = SysAllocString( (const WCHAR *)(INT_PTR)val );
if (val)
{
vartype = VT_BSTR;
val_bstr = SysAllocString( (const WCHAR *)(INT_PTR)val );
}
else
vartype = VT_NULL;
break;
case CIM_SINT16:
if (!vartype) vartype = VT_I2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment