propsys: Add VT_EMPTY support for PropVariantToStringAlloc().

Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Jactry Zeng 2019-02-16 00:14:54 +08:00 committed by Alexandre Julliard
parent 338ba122f3
commit 8db8c94155
2 changed files with 7 additions and 0 deletions

View File

@ -314,6 +314,7 @@ HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret)
switch(propvarIn->vt)
{
case VT_EMPTY:
case VT_NULL:
res = CoTaskMemAlloc(1*sizeof(WCHAR));
res[0] = '\0';

View File

@ -641,6 +641,12 @@ static void test_PropVariantToStringAlloc(void)
ok(!lstrcmpW(str, topicW), "got %s\n", wine_dbgstr_w(str));
CoTaskMemFree(str);
PropVariantClear(&prop);
prop.vt = VT_EMPTY;
hres = PropVariantToStringAlloc(&prop, &str);
ok(hres == S_OK, "returned %x\n", hres);
ok(!lstrcmpW(str, emptyW), "got %s\n", wine_dbgstr_w(str));
CoTaskMemFree(str);
}
static void test_PropVariantCompare(void)