oleaut32: Fix CreateDispTypeInfo to store the correct number of functions.

This commit is contained in:
Huw Davies 2007-05-18 13:57:05 +01:00 committed by Alexandre Julliard
parent c24a53dc28
commit b698b2909b
2 changed files with 6 additions and 0 deletions

View File

@ -350,10 +350,15 @@ static void test_CreateDispTypeInfo(void)
hr = ITypeInfo_GetTypeAttr(pTI2, &pTypeAttr);
ok(hr == S_OK, "hr %08x\n", hr);
ok(pTypeAttr->typekind == TKIND_INTERFACE, "typekind %0x\n", pTypeAttr->typekind);
ok(pTypeAttr->cFuncs == 4, "cFuncs %d\n", pTypeAttr->cFuncs);
ok(IsEqualGUID(&pTypeAttr->guid, &GUID_NULL), "guid {%08x-...}\n", pTypeAttr->guid.Data1);
ok(pTypeAttr->wTypeFlags == 0, "typeflags %08x\n", pTypeAttr->wTypeFlags);
ITypeInfo_ReleaseTypeAttr(pTI2, pTypeAttr);
hr = ITypeInfo_GetFuncDesc(pTI2, 0, &pFuncDesc);
ok(hr == S_OK, "hr %08x\n", hr);
ok(pFuncDesc->memid == 0x123, "memid %x\n", pFuncDesc->memid);
ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind);
ok(pFuncDesc->invkind == methdata[0].wFlags, "invkind %d\n", pFuncDesc->invkind);
ok(pFuncDesc->callconv == methdata[0].cc, "callconv %d\n", pFuncDesc->callconv);

View File

@ -6884,6 +6884,7 @@ HRESULT WINAPI CreateDispTypeInfo(
(*ppFuncDesc)->ctCustData = 0;
(*ppFuncDesc)->pCustData = NULL;
(*ppFuncDesc)->next = NULL;
pTIIface->TypeAttr.cFuncs++;
ppFuncDesc = &(*ppFuncDesc)->next;
}