oleaut: ITypeInfo::GetIDsOfNames should search inherited interfaces
regardless of what type they are. Add a test for this and dump type infos created with CreateDispTypeInfo.
This commit is contained in:
parent
130a0e4f41
commit
4b19449b6b
|
@ -227,13 +227,15 @@ static void test_CreateDispTypeInfo(void)
|
||||||
TYPEATTR *pTypeAttr;
|
TYPEATTR *pTypeAttr;
|
||||||
HREFTYPE href;
|
HREFTYPE href;
|
||||||
FUNCDESC *pFuncDesc;
|
FUNCDESC *pFuncDesc;
|
||||||
|
MEMBERID memid;
|
||||||
|
|
||||||
static const WCHAR func1[] = {'f','u','n','c','1',0};
|
static const WCHAR func1[] = {'f','u','n','c','1',0};
|
||||||
static const WCHAR func2[] = {'f','u','n','c','2',0};
|
static const WCHAR func2[] = {'f','u','n','c','2',0};
|
||||||
static const WCHAR func3[] = {'f','u','n','c','3',0};
|
static const WCHAR func3[] = {'f','u','n','c','3',0};
|
||||||
static const WCHAR parm1[] = {'p','a','r','m','1',0};
|
static const WCHAR parm1[] = {'p','a','r','m','1',0};
|
||||||
static const WCHAR parm2[] = {'p','a','r','m','2',0};
|
static const WCHAR parm2[] = {'p','a','r','m','2',0};
|
||||||
|
OLECHAR *name = (OLECHAR *)func1;
|
||||||
|
|
||||||
ifdata.pmethdata = methdata;
|
ifdata.pmethdata = methdata;
|
||||||
ifdata.cMembers = sizeof(methdata) / sizeof(methdata[0]);
|
ifdata.cMembers = sizeof(methdata) / sizeof(methdata[0]);
|
||||||
|
|
||||||
|
@ -293,6 +295,9 @@ static void test_CreateDispTypeInfo(void)
|
||||||
|
|
||||||
hr = ITypeInfo_GetRefTypeOfImplType(pTypeInfo, 0, &href);
|
hr = ITypeInfo_GetRefTypeOfImplType(pTypeInfo, 0, &href);
|
||||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||||
|
todo_wine {
|
||||||
|
ok(href == 0, "href = 0x%lx\n", href);
|
||||||
|
}
|
||||||
hr = ITypeInfo_GetRefTypeInfo(pTypeInfo, href, &pTI2);
|
hr = ITypeInfo_GetRefTypeInfo(pTypeInfo, href, &pTI2);
|
||||||
ok(hr == S_OK, "hr %08lx\n", hr);
|
ok(hr == S_OK, "hr %08lx\n", hr);
|
||||||
hr = ITypeInfo_GetTypeAttr(pTI2, &pTypeAttr);
|
hr = ITypeInfo_GetTypeAttr(pTI2, &pTypeAttr);
|
||||||
|
@ -351,6 +356,11 @@ static void test_CreateDispTypeInfo(void)
|
||||||
ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_I4, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt);
|
ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_I4, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt);
|
||||||
ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
|
ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc);
|
||||||
|
|
||||||
|
/* test GetIDsOfNames on a coclass to see if it searches its interfaces */
|
||||||
|
hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &name, 1, &memid);
|
||||||
|
ok(hr == S_OK, "hr 0x%08lx\n", hr);
|
||||||
|
ok(memid == 0x123, "memid 0x%08lx\n", memid);
|
||||||
|
|
||||||
ITypeInfo_Release(pTI2);
|
ITypeInfo_Release(pTI2);
|
||||||
ITypeInfo_Release(pTypeInfo);
|
ITypeInfo_Release(pTypeInfo);
|
||||||
|
|
||||||
|
|
|
@ -4784,9 +4784,8 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* not found, see if this is and interface with an inheritance */
|
/* not found, see if it can be found in an inherited interface */
|
||||||
if(This->TypeAttr.cImplTypes &&
|
if(This->TypeAttr.cImplTypes) {
|
||||||
(This->TypeAttr.typekind==TKIND_INTERFACE || This->TypeAttr.typekind==TKIND_DISPATCH)) {
|
|
||||||
/* recursive search */
|
/* recursive search */
|
||||||
ITypeInfo *pTInfo;
|
ITypeInfo *pTInfo;
|
||||||
ret=ITypeInfo_GetRefTypeInfo(iface,
|
ret=ITypeInfo_GetRefTypeInfo(iface,
|
||||||
|
@ -6338,7 +6337,7 @@ HRESULT WINAPI CreateDispTypeInfo(
|
||||||
int param, func;
|
int param, func;
|
||||||
TLBFuncDesc **ppFuncDesc;
|
TLBFuncDesc **ppFuncDesc;
|
||||||
|
|
||||||
TRACE_(typelib)("\n");
|
TRACE("\n");
|
||||||
pTypeLibImpl = TypeLibImpl_Constructor();
|
pTypeLibImpl = TypeLibImpl_Constructor();
|
||||||
if (!pTypeLibImpl) return E_FAIL;
|
if (!pTypeLibImpl) return E_FAIL;
|
||||||
|
|
||||||
|
@ -6394,6 +6393,8 @@ HRESULT WINAPI CreateDispTypeInfo(
|
||||||
ppFuncDesc = &(*ppFuncDesc)->next;
|
ppFuncDesc = &(*ppFuncDesc)->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dump_TypeInfo(pTIIface);
|
||||||
|
|
||||||
pTypeLibImpl->pTypeInfo = pTIIface;
|
pTypeLibImpl->pTypeInfo = pTIIface;
|
||||||
pTypeLibImpl->TypeInfoCount++;
|
pTypeLibImpl->TypeInfoCount++;
|
||||||
|
|
||||||
|
@ -6423,6 +6424,8 @@ HRESULT WINAPI CreateDispTypeInfo(
|
||||||
pTIClass->reflist->reference = 1;
|
pTIClass->reflist->reference = 1;
|
||||||
pTIClass->reflist->pImpTLInfo = TLB_REF_INTERNAL;
|
pTIClass->reflist->pImpTLInfo = TLB_REF_INTERNAL;
|
||||||
|
|
||||||
|
dump_TypeInfo(pTIClass);
|
||||||
|
|
||||||
pTIIface->next = pTIClass;
|
pTIIface->next = pTIClass;
|
||||||
pTypeLibImpl->TypeInfoCount++;
|
pTypeLibImpl->TypeInfoCount++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue