From: Vibhav Pant vibhavp@gmail.com
--- dlls/propsys/propvar.c | 8 ++++++++ dlls/propsys/tests/propsys.c | 6 ++---- 2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c index 342764a661c..e92e82744a4 100644 --- a/dlls/propsys/propvar.c +++ b/dlls/propsys/propvar.c @@ -767,6 +767,14 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p return hr; }
+ case VT_CLSID: + { + GUID guid; + if (SUCCEEDED((hr = PropVariantToGUID(propvarSrc, &guid)))) + hr = InitPropVariantFromCLSID(&guid, ppropvarDest); + return hr; + } + default: FIXME("Unhandled dest type: %d\n", vt); return E_FAIL; diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c index 25675d67e50..fe688920646 100644 --- a/dlls/propsys/tests/propsys.c +++ b/dlls/propsys/tests/propsys.c @@ -1641,8 +1641,7 @@ static void test_PropVariantChangeType_CLSID(void) src.pwszVal = CoTaskMemAlloc((wcslen(test_cases[i].str) + 1) * sizeof(WCHAR)); wcscpy(src.pwszVal, test_cases[i].str); hr = PropVariantChangeType(&dest, &src, 0, VT_CLSID); - todo_wine - ok(hr == test_cases[i].hr, "Unexpected hr %#lx.\n", hr); + ok(hr == test_cases[i].hr, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(dest.vt == VT_CLSID, "Unexecpted type %d.\n", dest.vt); @@ -1654,8 +1653,7 @@ static void test_PropVariantChangeType_CLSID(void) src.vt = VT_BSTR; src.bstrVal = SysAllocString(test_cases[i].str); hr = PropVariantChangeType(&dest, &src, 0, VT_CLSID); - todo_wine - ok(hr == test_cases[i].hr, "Unexpected hr %#lx.\n", hr); + ok(hr == test_cases[i].hr, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(dest.vt == VT_CLSID, "Unexpected type %d.\n", dest.vt);