Commit fa49c971 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

oleaut32: Initialize member IDs to MEMBERID_NIL inITypeInfo::GetIDsOfNames.

Better tracing.
parent 088fc70e
...@@ -3614,7 +3614,11 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoOfGuid( ...@@ -3614,7 +3614,11 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoOfGuid(
TRACE("(%p)\n\tguid:\t%s)\n",This,debugstr_guid(guid)); TRACE("(%p)\n\tguid:\t%s)\n",This,debugstr_guid(guid));
if (!pTypeInfo) return TYPE_E_ELEMENTNOTFOUND; if (!pTypeInfo)
{
WARN("-- element not found\n");
return TYPE_E_ELEMENTNOTFOUND;
}
/* search linked list for guid */ /* search linked list for guid */
while( !IsEqualIID(guid,&pTypeInfo->TypeAttr.guid) ) while( !IsEqualIID(guid,&pTypeInfo->TypeAttr.guid) )
...@@ -3624,7 +3628,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoOfGuid( ...@@ -3624,7 +3628,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoOfGuid(
if (!pTypeInfo) if (!pTypeInfo)
{ {
/* end of list reached */ /* end of list reached */
TRACE("-- element not found\n"); WARN("-- element not found\n");
return TYPE_E_ELEMENTNOTFOUND; return TYPE_E_ELEMENTNOTFOUND;
} }
} }
...@@ -4771,11 +4775,17 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface, ...@@ -4771,11 +4775,17 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface,
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
HRESULT ret=S_OK; HRESULT ret=S_OK;
int i;
TRACE("(%p) Name %s cNames %d\n", This, debugstr_w(*rgszNames), TRACE("(%p) Name %s cNames %d\n", This, debugstr_w(*rgszNames),
cNames); cNames);
/* init out parameters in case of failure */
for (i = 0; i < cNames; i++)
pMemId[i] = MEMBERID_NIL;
for(pFDesc=This->funclist; pFDesc; pFDesc=pFDesc->next) { for(pFDesc=This->funclist; pFDesc; pFDesc=pFDesc->next) {
int i, j; int j;
if(!lstrcmpiW(*rgszNames, pFDesc->Name)) { if(!lstrcmpiW(*rgszNames, pFDesc->Name)) {
if(cNames) *pMemId=pFDesc->funcdesc.memid; if(cNames) *pMemId=pFDesc->funcdesc.memid;
for(i=1; i < cNames; i++){ for(i=1; i < cNames; i++){
...@@ -4787,6 +4797,7 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface, ...@@ -4787,6 +4797,7 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface,
else else
ret=DISP_E_UNKNOWNNAME; ret=DISP_E_UNKNOWNNAME;
}; };
TRACE("-- 0x%08lx\n", ret);
return ret; return ret;
} }
} }
......
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