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



Reply via email to