OLE: fix invoking dispinterface functions
Fix invoking dispinterface functions by using the internal representation of the function, not the one returned to applications.
This commit is contained in:
parent
c73679e4eb
commit
bd8fefd66b
|
@ -5185,25 +5185,29 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
|
||||||
{
|
{
|
||||||
ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
|
ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
|
||||||
int i;
|
int i;
|
||||||
unsigned int func_index, var_index;
|
unsigned int var_index;
|
||||||
TYPEKIND type_kind;
|
TYPEKIND type_kind;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
const TLBFuncDesc *pFuncInfo;
|
||||||
|
|
||||||
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",
|
||||||
This,pIUnk,memid,dwFlags,pDispParams,pVarResult,pExcepInfo,pArgErr
|
This,pIUnk,memid,dwFlags,pDispParams,pVarResult,pExcepInfo,pArgErr
|
||||||
);
|
);
|
||||||
dump_DispParms(pDispParams);
|
dump_DispParms(pDispParams);
|
||||||
|
|
||||||
hres = ITypeInfo2_GetFuncIndexOfMemId(iface, memid, dwFlags, &func_index);
|
/* we do this instead of using GetFuncDesc since it will return a fake
|
||||||
if (SUCCEEDED(hres)) {
|
* FUNCDESC for dispinterfaces and we want the real function description */
|
||||||
FUNCDESC *func_desc;
|
for (pFuncInfo = This->funclist; pFuncInfo; pFuncInfo=pFuncInfo->next)
|
||||||
|
if (memid == pFuncInfo->funcdesc.memid && (dwFlags & pFuncInfo->funcdesc.invkind))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (pFuncInfo) {
|
||||||
|
const FUNCDESC *func_desc = &pFuncInfo->funcdesc;
|
||||||
|
|
||||||
hres = ITypeInfo2_GetFuncDesc(iface, func_index, &func_desc);
|
|
||||||
if(FAILED(hres)) return hres;
|
|
||||||
if (TRACE_ON(ole))
|
if (TRACE_ON(ole))
|
||||||
{
|
{
|
||||||
TRACE("invoking:\n");
|
TRACE("invoking:\n");
|
||||||
dump_FUNCDESC(func_desc);
|
dump_TLBFuncDesc(pFuncInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (func_desc->funckind) {
|
switch (func_desc->funckind) {
|
||||||
|
@ -5376,7 +5380,6 @@ func_fail:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ITypeInfo2_ReleaseFuncDesc(iface, func_desc);
|
|
||||||
TRACE("-- 0x%08lx\n", hres);
|
TRACE("-- 0x%08lx\n", hres);
|
||||||
return hres;
|
return hres;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue