oleaut32: Don't invoke a function that has the restricted attribute or is part of an interface that's marked as restricted.

This commit is contained in:
Huw Davies 2010-07-29 13:20:21 +01:00 committed by Alexandre Julliard
parent 941aeade01
commit baef9a7e92
1 changed files with 4 additions and 3 deletions

View File

@ -6017,13 +6017,13 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
unsigned int var_index;
TYPEKIND type_kind;
HRESULT hres;
const TLBFuncDesc *pFuncInfo = This->funclist;
const TLBFuncDesc *pFuncInfo;
TRACE("(%p)(%p,id=%d,flags=0x%08x,%p,%p,%p,%p)\n",
This,pIUnk,memid,wFlags,pDispParams,pVarResult,pExcepInfo,pArgErr
);
if( pFuncInfo->funcdesc.wFuncFlags == FUNCFLAG_FRESTRICTED )
if( This->TypeAttr.wTypeFlags & TYPEFLAG_FRESTRICTED )
return DISP_E_MEMBERNOTFOUND;
if (!pDispParams)
@ -6045,7 +6045,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
* FUNCDESC for dispinterfaces and we want the real function description */
for (pFuncInfo = This->funclist; pFuncInfo; pFuncInfo=pFuncInfo->next)
if ((memid == pFuncInfo->funcdesc.memid) &&
(wFlags & pFuncInfo->funcdesc.invkind))
(wFlags & pFuncInfo->funcdesc.invkind) &&
(pFuncInfo->funcdesc.wFuncFlags & FUNCFLAG_FRESTRICTED) == 0)
break;
if (pFuncInfo) {