a little dll/oleaut32/tmarshal.c correction

Evalet Olivier evaleto at programmers.ch
Thu Sep 18 06:49:44 CDT 2003


For Marcus Meissner,

Concerning the file dll/oleaut32/tmarshal.c, I have added a check for a
result function. Below, the modified function with (SUCCEEDED test). It
prevent a crash in my application.

I don't no if the test: if (hres)... is writted to be equivalent of :
if (SUCCEEDED(hres))...
??

static int _nroffuncs(ITypeInfo *tinfo) {
    int 	n, max = 0;
    FUNCDESC	*fdesc;
    HRESULT	hres;

    n=0;
    while (1) {
	hres = ITypeInfo_GetFuncDesc(tinfo,n,&fdesc);
	if (SUCCEEDED(hres) && fdesc->oVft/4 > max)
	    max = fdesc->oVft/4;
	if (hres)
	    return max+1;
	n++;
    }
    /*NOTREACHED*/
}

Olivier

------------------
www.programmers.ch





More information about the wine-devel mailing list