oleaut32: Fix the SafeArrayGetVartype tests on Vista and use that behaviour.
This commit is contained in:
parent
f46a42d66f
commit
e22e480f16
|
@ -1500,6 +1500,8 @@ HRESULT WINAPI SafeArrayGetVartype(SAFEARRAY* psa, VARTYPE* pvt)
|
||||||
|
|
||||||
if (psa->fFeatures & FADF_RECORD)
|
if (psa->fFeatures & FADF_RECORD)
|
||||||
*pvt = VT_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)
|
else if (psa->fFeatures & FADF_HAVEIID)
|
||||||
*pvt = VT_UNKNOWN;
|
*pvt = VT_UNKNOWN;
|
||||||
else if (psa->fFeatures & FADF_HAVEVARTYPE)
|
else if (psa->fFeatures & FADF_HAVEVARTYPE)
|
||||||
|
|
|
@ -490,12 +490,8 @@ static void test_safearray(void)
|
||||||
{
|
{
|
||||||
hres = pSafeArrayGetVartype(a, &vt);
|
hres = pSafeArrayGetVartype(a, &vt);
|
||||||
ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %x\n", vttypes[i].vt, hres);
|
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) {
|
/* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */
|
||||||
/* Special case. Checked against Windows. */
|
ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hres = SafeArrayCopy(a, &c);
|
hres = SafeArrayCopy(a, &c);
|
||||||
|
@ -509,12 +505,8 @@ static void test_safearray(void)
|
||||||
if (pSafeArrayGetVartype) {
|
if (pSafeArrayGetVartype) {
|
||||||
hres = pSafeArrayGetVartype(c, &vt);
|
hres = pSafeArrayGetVartype(c, &vt);
|
||||||
ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres);
|
ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres);
|
||||||
if (vttypes[i].vt == VT_DISPATCH) {
|
/* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */
|
||||||
/* Special case. Checked against Windows. */
|
ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pSafeArrayCopyData) {
|
if (pSafeArrayCopyData) {
|
||||||
|
|
Loading…
Reference in New Issue