diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 6d476143ad6..c6539eb6031 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1373,7 +1373,8 @@ static void test_CreateTypeLib(void) { ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 32, "cbSizeVft = %d\n", typeattr->cbSizeVft); + ok(typeattr->cbSizeVft == 32 || broken(typeattr->cbSizeVft == 7 * sizeof(void *) + 4), /* xp64 */ + "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "wTypeFlags = %d\n", typeattr->wTypeFlags); ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); @@ -1395,7 +1396,7 @@ static void test_CreateTypeLib(void) { ok(typeattr->cFuncs == 8, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 28, "cbSizeVft = %d\n", typeattr->cbSizeVft); + ok(typeattr->cbSizeVft == 7 * sizeof(void *), "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "wTypeFlags = %d\n", typeattr->wTypeFlags); ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); @@ -1414,7 +1415,8 @@ static void test_CreateTypeLib(void) { ok(typeattr->cFuncs == 11, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 56, "cbSizeVft = %d\n", typeattr->cbSizeVft); + ok(typeattr->cbSizeVft == 56 || broken(typeattr->cbSizeVft == 3 * sizeof(void *) + 44), /* xp64 */ + "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); ok(typeattr->wTypeFlags == 0, "wTypeFlags = %d\n", typeattr->wTypeFlags); ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 6b1aea062ba..a93e5a4962a 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -2456,7 +2456,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( return hres; } - This->typeinfo->cbSizeVft = typeattr->cbSizeVft; + This->typeinfo->cbSizeVft = typeattr->cbSizeVft * 4 / sizeof(void *); ITypeInfo_ReleaseTypeAttr(inherited, typeattr); ITypeInfo_Release(inherited); @@ -2928,7 +2928,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeAttr( (*ppTypeAttr)->cFuncs += 7; (*ppTypeAttr)->cVars = This->typeinfo->cElement>>16; (*ppTypeAttr)->cImplTypes = This->typeinfo->cImplTypes; - (*ppTypeAttr)->cbSizeVft = This->typekind==TKIND_DISPATCH ? 28 : This->typeinfo->cbSizeVft; + (*ppTypeAttr)->cbSizeVft = This->typekind==TKIND_DISPATCH ? 7 * sizeof(void*) : This->typeinfo->cbSizeVft; (*ppTypeAttr)->cbAlignment = (This->typeinfo->typekind>>11) & 0x1f; (*ppTypeAttr)->wTypeFlags = This->typeinfo->flags; (*ppTypeAttr)->wMajorVerNum = This->typeinfo->version&0xffff;