Module: wine Branch: master Commit: 0346ba91312c6b674bd05b3db40f0831881a652a URL: http://source.winehq.org/git/wine.git/?a=commit;h=0346ba91312c6b674bd05b3db4...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Dec 22 05:03:02 2010 +0300
oleaut32: Added ICreateTypeInfo2::SetVarHelpContext().
---
dlls/oleaut32/typelib2.c | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 825dca5..e0e78ee 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -2206,7 +2206,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( int var_type_size; int alignment;
- TRACE("(%p,%d,%p), stub!\n", iface, index, pVarDesc); + TRACE("(%p,%d,%p)\n", iface, index, pVarDesc); TRACE("%d, %p, %d, {{%x, %d}, {%p, %x}}, 0x%x, %d\n", pVarDesc->memid, pVarDesc->lpstrSchema, pVarDesc->u.oInst, pVarDesc->elemdescVar.tdesc.u.hreftype, pVarDesc->elemdescVar.tdesc.vt, pVarDesc->elemdescVar.u.paramdesc.pparamdescex, pVarDesc->elemdescVar.u.paramdesc.wParamFlags, @@ -2543,10 +2543,27 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncHelpContext( static HRESULT WINAPI ICreateTypeInfo2_fnSetVarHelpContext( ICreateTypeInfo2* iface, UINT index, - DWORD dwHelpContext) + DWORD context) { - FIXME("(%p,%d,%d), stub!\n", iface, index, dwHelpContext); - return E_OUTOFMEMORY; + ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; + CyclicList *iter; + + TRACE("(%p,%d,%d)\n", This, index, context); + + if ((This->typeinfo->cElement >> 16) <= index) + return TYPE_E_ELEMENTNOTFOUND; + + for (iter = This->typedata->next->next; iter != This->typedata; iter = iter->next) + if (iter->type == CyclicListVar) + { + if (index-- == 0) + { + iter->u.data[5] = context; + return S_OK; + } + } + + return TYPE_E_ELEMENTNOTFOUND; }
/******************************************************************************