oleaut32: Match funcdesc using both memberid and invkind.
Property access functions can share the same memberid. Signed-off-by: Porot Mo <porotmjp@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3b7c642001
commit
48ef66e9e3
|
@ -1050,11 +1050,9 @@ static void test_TypeInfo(void)
|
|||
|
||||
/* correct memberid -- wrong invkind */
|
||||
hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x60000000, INVOKE_FUNC, &bstrDllName, &bstrName, &ordinal);
|
||||
todo_wine
|
||||
ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr);
|
||||
|
||||
hr = ITypeInfo_GetDllEntry(pTypeInfo, 0x60000000, INVOKE_PROPERTYPUTREF, &bstrDllName, &bstrName, &ordinal);
|
||||
todo_wine
|
||||
ok(hr == TYPE_E_ELEMENTNOTFOUND, "ITypeInfo_GetDllEntry should have returned TYPE_E_ELEMENTNOTFOUND instead of 0x%08x\n", hr);
|
||||
|
||||
/* correct memberid -- correct invkind */
|
||||
|
@ -1069,7 +1067,6 @@ todo_wine
|
|||
ok_ole_success(hr, ITypeInfo_GetDllEntry);
|
||||
ok(!lstrcmpW(bstrDllName, wszTestDll), "got %s\n", wine_dbgstr_w(bstrDllName));
|
||||
ok(bstrName == NULL, "got %s\n", wine_dbgstr_w(bstrName));
|
||||
todo_wine
|
||||
ok(ordinal == 2, "got ordinal: %04x\n", ordinal);
|
||||
SysFreeString(bstrDllName);
|
||||
|
||||
|
|
|
@ -1701,6 +1701,19 @@ static inline TLBFuncDesc *TLB_get_funcdesc_by_memberid(ITypeInfoImpl *typeinfo,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline TLBFuncDesc *TLB_get_funcdesc_by_memberid_invkind(ITypeInfoImpl *typeinfo, MEMBERID memid, INVOKEKIND invkind)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < typeinfo->typeattr.cFuncs; ++i)
|
||||
{
|
||||
if (typeinfo->funcdescs[i].funcdesc.memid == memid && typeinfo->funcdescs[i].funcdesc.invkind == invkind)
|
||||
return &typeinfo->funcdescs[i];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline TLBVarDesc *TLB_get_vardesc_by_memberid(ITypeInfoImpl *typeinfo, MEMBERID memid)
|
||||
{
|
||||
int i;
|
||||
|
@ -7804,7 +7817,7 @@ static HRESULT WINAPI ITypeInfo_fnGetDllEntry( ITypeInfo2 *iface, MEMBERID memid
|
|||
if (This->typeattr.typekind != TKIND_MODULE)
|
||||
return TYPE_E_BADMODULEKIND;
|
||||
|
||||
pFDesc = TLB_get_funcdesc_by_memberid(This, memid);
|
||||
pFDesc = TLB_get_funcdesc_by_memberid_invkind(This, memid, invKind);
|
||||
if (!pFDesc) return TYPE_E_ELEMENTNOTFOUND;
|
||||
|
||||
dump_TypeInfo(This);
|
||||
|
|
Loading…
Reference in New Issue