[2/2] mshtml: Add VT_INT support in IHTMLElementCollection_item

Konstantin Kondratyuk kondratyuk at etersoft.ru
Mon Dec 22 03:56:29 CST 2008

Hi, Jacek!

On Friday 19 December 2008 18:04:45 Jacek Caban wrote:
> You're duplicating the code that handles VT_I4 case. Please avoid it.

Do you think, this code will be better? And can I truncate "VT_I4" from trace?

    if(V_VT(&name) == VT_I4 || V_VT(&name) == VT_INT) {
        int i;

        if (V_VT(&name) == VT_I4) {
            i = V_I4(&name);
            TRACE("name is VT_I4: %d\n", i);
        else {
            i = V_INT(&name);
            TRACE("name is VT_INT: %d\n", i);

        if(i < 0)
            return E_INVALIDARG;
        if(i >= This->len)
            return S_OK;

        *pdisp = (IDispatch*)This->elems[i];
        TRACE("Returning pdisp=%p\n", pdisp);
        return S_OK;

And about my test for this problem - it's OK?

Best regards,
Konstantin Kondratyuk.

More information about the wine-devel mailing list