Module: wine Branch: master Commit: b698b2909b60b72c35743d9691c1da337d9f7423 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b698b2909b60b72c35743d9691...
Author: Huw Davies huw@codeweavers.com Date: Fri May 18 13:57:05 2007 +0100
oleaut32: Fix CreateDispTypeInfo to store the correct number of functions.
---
dlls/oleaut32/tests/typelib.c | 5 +++++ dlls/oleaut32/typelib.c | 1 + 2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index a963834..d19afd3 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -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); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index a0d4ee4..f3ee2bf 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -6884,6 +6884,7 @@ HRESULT WINAPI CreateDispTypeInfo( (*ppFuncDesc)->ctCustData = 0; (*ppFuncDesc)->pCustData = NULL; (*ppFuncDesc)->next = NULL; + pTIIface->TypeAttr.cFuncs++; ppFuncDesc = &(*ppFuncDesc)->next; }