Commit 6b974380 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

oleaut32: Convert some tabs to spaces and some other formatting changes.

parent fa49c971
......@@ -5335,7 +5335,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
hres = S_OK;
numargs = 1; /* sizeof(thisptr) */
numargs2 = 0;
for (i = 0; i < func_desc->cParams; i++) {
for (i = 0; i < func_desc->cParams; i++)
{
TYPEDESC *tdesc = &func_desc->lprgelemdescParam[i].tdesc;
numargs += _argsize(tdesc->vt);
......@@ -5354,13 +5355,15 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
args[0] = (DWORD)pIUnk;
argspos = 1; args2pos = 0;
for (i = 0; i < func_desc->cParams; i++) {
for (i = 0; i < func_desc->cParams; i++)
{
ELEMDESC *elemdesc = &(func_desc->lprgelemdescParam[i]);
TYPEDESC *tdesc = &(elemdesc->tdesc);
USHORT paramFlags = elemdesc->u.paramdesc.wParamFlags;
int arglen = _argsize(tdesc->vt);
if (i<pDispParams->cArgs) {
if (i<pDispParams->cArgs)
{
VARIANT *arg = &rgvarg[pDispParams->cArgs-i-1];
if (paramFlags & PARAMFLAG_FOPT) {
......@@ -5381,7 +5384,9 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
hres = _copy_arg(iface, tdesc, &args[argspos], arg, tdesc->vt);
if (FAILED(hres)) goto func_fail;
argspos += arglen;
} else if (paramFlags & PARAMFLAG_FOPT) {
}
else if (paramFlags & PARAMFLAG_FOPT)
{
VARIANT *arg = &rgvarg[i];
if (i < func_desc->cParams - func_desc->cParamsOpt)
......@@ -5395,7 +5400,9 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
hres = _copy_arg(iface, tdesc, &args[argspos], arg, tdesc->vt);
if (FAILED(hres)) goto func_fail;
argspos += arglen;
} else {
}
else
{
if (tdesc->vt == VT_PTR)
arglen = _argsize(tdesc->u.lptdesc->vt);
else
......@@ -5459,11 +5466,13 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
}
}
if ((func_desc->elemdescFunc.tdesc.vt == VT_HRESULT) && FAILED(res)) {
if ((func_desc->elemdescFunc.tdesc.vt == VT_HRESULT) && FAILED(res))
{
WARN("invoked function failed with error 0x%08lx\n", res);
hres = DISP_E_EXCEPTION;
if (pExcepInfo) pExcepInfo->scode = res;
}
func_fail:
HeapFree(GetProcessHeap(), 0, rgvarg);
HeapFree(GetProcessHeap(),0,args2);
......
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