From 45306f8671c3d8f12c2f2bfcfb9096bc4426878a Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 17 Mar 2010 22:04:53 +0100 Subject: [PATCH] oleaut32: Improve ITypeInfo2 GetTypeAttr implementation. --- dlls/oleaut32/tests/typelib.c | 2 +- dlls/oleaut32/typelib2.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 797ac022929..6e44f58f9b5 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1386,7 +1386,7 @@ static void test_CreateTypeLib(void) { ok(hres == S_OK, "got %08x\n", hres); ok(typeattr->cbSizeInstance == 4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); ok(typeattr->typekind == 4, "typekind = %d\n", typeattr->typekind); - todo_wine ok(typeattr->cFuncs == 8, "cFuncs = %d\n", typeattr->cFuncs); + 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); diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 08b8684037e..a6e12cdd591 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -2919,6 +2919,8 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeAttr( (*ppTypeAttr)->cbSizeInstance = This->typeinfo->size; (*ppTypeAttr)->typekind = This->typekind; (*ppTypeAttr)->cFuncs = This->typeinfo->cElement&0xffff; + if(This->typeinfo->flags&TYPEFLAG_FDUAL && This->typekind==TKIND_DISPATCH) + (*ppTypeAttr)->cFuncs += 7; (*ppTypeAttr)->cVars = This->typeinfo->cElement>>16; (*ppTypeAttr)->cImplTypes = This->typeinfo->cImplTypes; (*ppTypeAttr)->cbSizeVft = This->typekind==TKIND_DISPATCH ? 28 : This->typeinfo->cbSizeVft;