Commit e22e480f authored by Reece Dunn's avatar Reece Dunn Committed by Alexandre Julliard

oleaut32: Fix the SafeArrayGetVartype tests on Vista and use that behaviour.

parent f46a42d6
......@@ -1500,6 +1500,8 @@ HRESULT WINAPI SafeArrayGetVartype(SAFEARRAY* psa, VARTYPE* pvt)
if (psa->fFeatures & FADF_RECORD)
*pvt = VT_RECORD;
else if ((psa->fFeatures & (FADF_HAVEIID|FADF_DISPATCH)) == (FADF_HAVEIID|FADF_DISPATCH))
*pvt = VT_DISPATCH;
else if (psa->fFeatures & FADF_HAVEIID)
*pvt = VT_UNKNOWN;
else if (psa->fFeatures & FADF_HAVEVARTYPE)
......
......@@ -490,12 +490,8 @@ static void test_safearray(void)
{
hres = pSafeArrayGetVartype(a, &vt);
ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %x\n", vttypes[i].vt, hres);
if (vttypes[i].vt == VT_DISPATCH) {
/* Special case. Checked against Windows. */
ok(vt == VT_UNKNOWN, "SAGVT of array with VT_DISPATCH returned not VT_UNKNOWN, but %d\n", vt);
} else {
ok(vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt);
}
/* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */
ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt);
}
hres = SafeArrayCopy(a, &c);
......@@ -509,12 +505,8 @@ static void test_safearray(void)
if (pSafeArrayGetVartype) {
hres = pSafeArrayGetVartype(c, &vt);
ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres);
if (vttypes[i].vt == VT_DISPATCH) {
/* Special case. Checked against Windows. */
ok(vt == VT_UNKNOWN, "SAGVT of array with VT_DISPATCH returned not VT_UNKNOWN, but %d\n", vt);
} else {
ok(vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt);
}
/* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */
ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt);
}
if (pSafeArrayCopyData) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment