Signed-off-by: Jactry Zeng jzeng@codeweavers.com --- dlls/propsys/propvar.c | 3 +++ dlls/propsys/tests/propsys.c | 7 +++++++ 2 files changed, 10 insertions(+)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c index 3bf7e763a6..5950cc833b 100644 --- a/dlls/propsys/propvar.c +++ b/dlls/propsys/propvar.c @@ -749,6 +749,9 @@ HRESULT WINAPI PropVariantToGUID(const PROPVARIANT *ppropvar, GUID *guid) return PROPVAR_WCHARToGUID(ppropvar->u.bstrVal, SysStringLen(ppropvar->u.bstrVal), guid); case VT_LPWSTR: return PROPVAR_WCHARToGUID(ppropvar->u.pwszVal, strlenW(ppropvar->u.pwszVal), guid); + case VT_CLSID: + memcpy(guid, ppropvar->u.puuid, sizeof(*ppropvar->u.puuid)); + return S_OK;
default: FIXME("unsupported vt: %d\n", ppropvar->vt); diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c index 4fb6881471..05cff65151 100644 --- a/dlls/propsys/tests/propsys.c +++ b/dlls/propsys/tests/propsys.c @@ -620,6 +620,13 @@ static void test_PropVariantToGUID(void) ok(hres == S_OK, "PropVariantToGUID failed %x\n", hres); ok(!memcmp(&dummy_guid, &guid, sizeof(GUID)), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid)); PropVariantClear(&propvar); + + memset(&guid, 0, sizeof(guid)); + InitPropVariantFromCLSID(&dummy_guid, &propvar); + hres = PropVariantToGUID(&propvar, &guid); + ok(hres == S_OK, "PropVariantToGUID failed %x\n", hres); + ok(!memcmp(&dummy_guid, &guid, sizeof(GUID)), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid)); + PropVariantClear(&propvar); }
static void test_PropVariantToStringAlloc(void)