Module: wine Branch: master Commit: 16468517bb9fed3569365449320617d6bb70af51 URL: http://source.winehq.org/git/wine.git/?a=commit;h=16468517bb9fed356936544932...
Author: Andrey Turkin andrey.turkin@gmail.com Date: Mon May 17 02:28:11 2010 +0400
oleaut32: Set flag for retval params in ICreateTypeInfo::AddFuncDesc.
---
dlls/oleaut32/typelib2.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index df36268..b5ebea3 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -1766,7 +1766,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(
CyclicList *iter, *insert; int *typedata; - int i, num_defaults = 0; + int i, num_defaults = 0, num_retval = 0; int decoded_size; HRESULT hres;
@@ -1806,9 +1806,12 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( return TYPE_E_INCONSISTENTPROPFUNCS;
/* get number of arguments with default values specified */ - for (i = 0; i < pFuncDesc->cParams; i++) + for (i = 0; i < pFuncDesc->cParams; i++) { if(pFuncDesc->lprgelemdescParam[i].u.paramdesc.wParamFlags & PARAMFLAG_FHASDEFAULT) num_defaults++; + if(pFuncDesc->lprgelemdescParam[i].u.paramdesc.wParamFlags & PARAMFLAG_FRETVAL) + num_retval++; + }
if (!This->typedata) { This->typedata = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); @@ -1840,6 +1843,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( typedata[3] = ((sizeof(FUNCDESC) + decoded_size) << 16) | (unsigned short)(pFuncDesc->oVft?pFuncDesc->oVft+1:0); typedata[4] = (pFuncDesc->callconv << 8) | (pFuncDesc->invkind << 3) | pFuncDesc->funckind; if(num_defaults) typedata[4] |= 0x1000; + if (num_retval) typedata[4] |= 0x4000; typedata[5] = pFuncDesc->cParams;
/* NOTE: High word of typedata[3] is total size of FUNCDESC + size of all ELEMDESCs for params + TYPEDESCs for pointer params and return types. */