Commit 45306f86 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

oleaut32: Improve ITypeInfo2 GetTypeAttr implementation.

parent 7c930589
......@@ -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);
......
......@@ -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;
......
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