Commit 8db8c941 authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

propsys: Add VT_EMPTY support for PropVariantToStringAlloc().

parent 338ba122
...@@ -314,6 +314,7 @@ HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret) ...@@ -314,6 +314,7 @@ HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret)
switch(propvarIn->vt) switch(propvarIn->vt)
{ {
case VT_EMPTY:
case VT_NULL: case VT_NULL:
res = CoTaskMemAlloc(1*sizeof(WCHAR)); res = CoTaskMemAlloc(1*sizeof(WCHAR));
res[0] = '\0'; res[0] = '\0';
......
...@@ -641,6 +641,12 @@ static void test_PropVariantToStringAlloc(void) ...@@ -641,6 +641,12 @@ static void test_PropVariantToStringAlloc(void)
ok(!lstrcmpW(str, topicW), "got %s\n", wine_dbgstr_w(str)); ok(!lstrcmpW(str, topicW), "got %s\n", wine_dbgstr_w(str));
CoTaskMemFree(str); CoTaskMemFree(str);
PropVariantClear(&prop); 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) static void test_PropVariantCompare(void)
......
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