Commit 033276b6 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Remove the remaining dependencies on internal structures from Invoke.

parent 86b95b8c
...@@ -4737,9 +4737,9 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( ...@@ -4737,9 +4737,9 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
UINT *pArgErr) UINT *pArgErr)
{ {
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBVarDesc * pVDesc;
int i; int i;
unsigned int func_index; unsigned int func_index, var_index;
TYPEKIND type_kind;
HRESULT hres; HRESULT hres;
TRACE("(%p)(%p,id=%ld,flags=0x%08x,%p,%p,%p,%p) partial stub!\n", TRACE("(%p)(%p,id=%ld,flags=0x%08x,%p,%p,%p,%p) partial stub!\n",
...@@ -4940,30 +4940,35 @@ func_fail: ...@@ -4940,30 +4940,35 @@ func_fail:
ITypeInfo2_ReleaseFuncDesc(iface, func_desc); ITypeInfo2_ReleaseFuncDesc(iface, func_desc);
return hres; return hres;
} else { } else if(SUCCEEDED(hres = ITypeInfo2_GetVarIndexOfMemId(iface, memid, &var_index))) {
for(pVDesc=This->varlist; pVDesc; pVDesc=pVDesc->next) { VARDESC *var_desc;
if (pVDesc->vardesc.memid == memid) {
FIXME("varseek: Found memid name %s, but variable-based invoking not supported\n",debugstr_w(((LPWSTR)pVDesc->Name))); hres = ITypeInfo2_GetVarDesc(iface, var_index, &var_desc);
dump_TLBVarDesc(pVDesc); if(FAILED(hres)) return hres;
break;
} FIXME("varseek: Found memid, but variable-based invoking not supported\n");
} dump_VARDESC(var_desc);
ITypeInfo2_ReleaseVarDesc(iface, var_desc);
return E_NOTIMPL;
} }
/* not found, look for it in inherited interfaces */ /* not found, look for it in inherited interfaces */
if (This->TypeAttr.cImplTypes && ITypeInfo2_GetTypeKind(iface, &type_kind);
(This->TypeAttr.typekind==TKIND_INTERFACE || This->TypeAttr.typekind==TKIND_DISPATCH)) { if(type_kind == TKIND_INTERFACE || type_kind == TKIND_DISPATCH) {
/* recursive search */ HREFTYPE ref_type;
ITypeInfo *pTInfo; if(SUCCEEDED(ITypeInfo2_GetRefTypeOfImplType(iface, 0, &ref_type))) {
HRESULT hr; /* recursive search */
hr=ITypeInfo_GetRefTypeInfo(iface, This->impltypelist->hRef, &pTInfo); ITypeInfo *pTInfo;
if(SUCCEEDED(hr)){ hres = ITypeInfo_GetRefTypeInfo(iface, ref_type, &pTInfo);
hr=ITypeInfo_Invoke(pTInfo,pIUnk,memid,dwFlags,pDispParams,pVarResult,pExcepInfo,pArgErr); if(SUCCEEDED(hres)){
ITypeInfo_Release(pTInfo); hres = ITypeInfo_Invoke(pTInfo,pIUnk,memid,dwFlags,pDispParams,pVarResult,pExcepInfo,pArgErr);
return hr; ITypeInfo_Release(pTInfo);
return hres;
}
WARN("Could not search inherited interface!\n");
} }
WARN("Could not search inherited interface!\n");
} }
ERR("did not find member id %d, flags %d!\n", (int)memid, dwFlags); ERR("did not find member id %08lx, flags %d!\n", memid, dwFlags);
return DISP_E_MEMBERNOTFOUND; return DISP_E_MEMBERNOTFOUND;
} }
......
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