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>
This commit is contained in:
parent
338ba122f3
commit
8db8c94155
|
@ -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';
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue