From: Vibhav Pant vibhavp@gmail.com
--- dlls/propsys/tests/propsys.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c index fe688920646..c00b5c0deb5 100644 --- a/dlls/propsys/tests/propsys.c +++ b/dlls/propsys/tests/propsys.c @@ -566,7 +566,10 @@ static void test_InitPropVariantFromBuffer(void)
static void test_PropVariantToGUID(void) { + SAFEARRAYBOUND arrbounds; PROPVARIANT propvar; + SAFEARRAY *arr; + void *buf; VARIANT var; GUID guid; HRESULT hres; @@ -635,6 +638,25 @@ static void test_PropVariantToGUID(void) ok(hres == S_OK, "PropVariantToGUID failed %lx\n", hres); ok(IsEqualGUID(&dummy_guid, &guid), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid)); PropVariantClear(&propvar); + + arrbounds.lLbound = 0; + arrbounds.cElements = sizeof(GUID); + arr = SafeArrayCreate(VT_UI1, 1, &arrbounds); + ok(!!arr, "SafeArrayCreate failed\n"); + hres = SafeArrayAccessData(arr, &buf); + ok(hres == S_OK, "SafeArrayAccessData failed %lx\n", hres); + memcpy(buf, &dummy_guid, sizeof(GUID)); + hres = SafeArrayUnaccessData(arr); + ok(hres == S_OK, "SafeArrayUnaccessData failed %lx\n", hres); + propvar.vt = VT_ARRAY | VT_UI1; + propvar.parray = arr; + memset(&guid, 0, sizeof(guid)); + hres = PropVariantToGUID(&propvar, &guid); + todo_wine + ok(hres == S_OK, "PropVariantToGUID failed %lx\n", hres); + if (SUCCEEDED(hres)) + ok(IsEqualGUID(&guid, &dummy_guid), "incorrect GUID created: %s\n", debugstr_guid(&guid)); + PropVariantClear(&propvar); }
static void test_PropVariantToStringAlloc(void)