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)
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=47678
Your paranoid android.
=== wvistau64 (64 bit report) ===
Report errors: propsys:propsys crashed (c0000374)
=== w2008s64 (64 bit report) ===
Report errors: propsys:propsys crashed (c0000374)
=== w7pro64 (64 bit report) ===
Report errors: propsys:propsys crashed (c0000374)
=== w864 (64 bit report) ===
Report errors: propsys:propsys crashed (c0000374)
=== w1064 (64 bit report) ===
Report errors: propsys:propsys crashed (c0000374)
Jactry Zeng jzeng@codeweavers.com wrote:
- 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));
IsEqualGUID() would be more appropriate than memcmp().