Changeset 6952 for trunk/src/oleaut32


Ignore:
Timestamp:
Oct 6, 2001, 10:56:18 AM (24 years ago)
Author:
sandervl
Message:

Wine 20011004 resync

Location:
trunk/src/oleaut32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/oleaut32/typelib.c

    r6944 r6952  
    123123        return S_OK;
    124124}
    125 #endif
    126  
     125#endif
    127126/****************************************************************************
    128127 *              QueryPathOfRegTypeLib   [OLEAUT32.164]
     
    558557}
    559558
    560 #ifdef __WIN32OS2__
     559#ifndef __WIN32OS2__
    561560/****************************************************************************
    562561 *      OaBuildVersion                          (TYPELIB.15)
     
    596595}
    597596#endif
     597
    598598/* for better debugging info leave the static out for the time being */
    599599#define static
     
    780780//#define TYPELIBDEBUG
    781781#if defined(__WIN32OS2__) && defined(TYPELIBDEBUG)
     782
    782783/*
    783784 debug
     
    18831884          {
    18841885            *ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength);
    1885             ITypeLib2_AddRef(*ppTypeLib);
    18861886          }
    18871887          else if ( dwSignature == SLTG_SIGNATURE)
    18881888          {
    18891889            *ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength);
    1890             ITypeLib2_AddRef(*ppTypeLib);
    18911890          }
    18921891          UnmapViewOfFile(pBase);
     
    19211920              {
    19221921                  *ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength);
    1923                   ITypeLib2_AddRef(*ppTypeLib);
    19241922              }
    19251923              else if ( dwSignature == SLTG_SIGNATURE)
    19261924              {
    19271925                  *ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength);
    1928                   ITypeLib2_AddRef(*ppTypeLib);
    19291926              }
    19301927              else
     
    24152412}
    24162413
    2417 static char *SLTG_DoImpls(SLTG_ImplInfo *info, ITypeInfoImpl *pTI,
     2414static char *SLTG_DoImpls(char *pBlk, ITypeInfoImpl *pTI,
    24182415                          BOOL OneOnly)
    24192416{
     2417    SLTG_ImplInfo *info;
    24202418    TLBImplType **ppImplType = &pTI->impltypelist;
    2421 
     2419    /* I don't really get this structure, usually it's 0x16 bytes
     2420       long, but iuser.tlb contains some that are 0x18 bytes long.
     2421       That's ok because we can use the next ptr to jump to the next
     2422       one. But how do we know the length of the last one?  The WORD
     2423       at offs 0x8 might be the clue.  For now I'm just assuming that
     2424       the last one is the regular 0x16 bytes. */
     2425
     2426    info = (SLTG_ImplInfo*)pBlk;
    24222427    while(1) {
    24232428        *ppImplType = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
     
    24322437        if(OneOnly)
    24332438            FIXME("Interface inheriting more than one interface\n");
    2434         info++;
    2435     }
    2436     info++;
     2439        info = (SLTG_ImplInfo*)(pBlk + info->next);
     2440    }
     2441    info++; /* see comment at top of function */
    24372442    return (char*)info;
    24382443}
     
    24562461
    24572462    if(*(WORD*)pFirstItem == SLTG_IMPL_MAGIC) {
    2458         pNextItem = SLTG_DoImpls((SLTG_ImplInfo*)pFirstItem, pTI, FALSE);
     2463        pNextItem = SLTG_DoImpls(pFirstItem, pTI, FALSE);
    24592464    }
    24602465
     
    24832488
    24842489    if(*(WORD*)pFirstItem == SLTG_IMPL_MAGIC) {
    2485         pNextItem = SLTG_DoImpls((SLTG_ImplInfo*)pFirstItem, pTI, TRUE);
     2490        pNextItem = SLTG_DoImpls(pFirstItem, pTI, TRUE);
    24862491    }
    24872492
     
    38473852    TLBVarDesc * pVDesc;
    38483853    HRESULT ret=S_OK;
    3849         UINT nNameLen = SysStringLen(*rgszNames);
    3850        
     3854
    38513855    TRACE("(%p) Name %s cNames %d\n", This, debugstr_w(*rgszNames),
    38523856            cNames);
    38533857    for(pFDesc=This->funclist; pFDesc; pFDesc=pFDesc->next) {
    38543858        int i, j;
    3855         if( !memcmp(*rgszNames, pFDesc->Name, nNameLen)) {
     3859        if(!lstrcmpiW(*rgszNames, pFDesc->Name)) {
    38563860            if(cNames) *pMemId=pFDesc->funcdesc.memid;
    38573861            for(i=1; i < cNames; i++){
    3858                                 UINT nParamLen = SysStringLen(rgszNames[i]);
    38593862                for(j=0; j<pFDesc->funcdesc.cParams; j++)
    3860                     if(memcmp(rgszNames[i],pFDesc->pParamDesc[j].Name, nParamLen))
     3863                    if(!lstrcmpiW(rgszNames[i],pFDesc->pParamDesc[j].Name))
    38613864                            break;
    38623865                if( j<pFDesc->funcdesc.cParams)
     
    38693872    }   
    38703873    for(pVDesc=This->varlist; pVDesc; pVDesc=pVDesc->next) {
    3871         if( !memcmp(*rgszNames, pVDesc->Name, nNameLen)) {
     3874        if(!lstrcmpiW(*rgszNames, pVDesc->Name)) {
    38723875            if(cNames) *pMemId=pVDesc->vardesc.memid;
    38733876            return ret;
     
    39843987    for(pFDesc=This->funclist; pFDesc; pFDesc=pFDesc->next)
    39853988        if (pFDesc->funcdesc.memid == memid) {
    3986             if (pFDesc->funcdesc.invkind & (dwFlags & ~DISPATCH_METHOD))
     3989            if (pFDesc->funcdesc.invkind & dwFlags)
    39873990                break;
    39883991        }
     
    40004003                if (i<pDispParams->cArgs) {
    40014004                    TRACE("set %d to disparg type %d vs %d\n",i,
    4002                             V_VT(pDispParams->rgvarg+i),
     4005                            V_VT(&pDispParams->rgvarg[pDispParams->cArgs-i-1]),
    40034006                            pFDesc->funcdesc.lprgelemdescParam[i].tdesc.vt
    40044007                    );
    4005                     args[i+1] = V_UNION(pDispParams->rgvarg+i,lVal);
     4008                    args[i+1] = V_UNION(&pDispParams->rgvarg[pDispParams->cArgs-i-1],lVal);
    40064009                } else {
    40074010                    TYPEDESC *tdesc = &(pFDesc->funcdesc.lprgelemdescParam[i].tdesc);
     
    40844087        }
    40854088    } else {
    4086         FIXME("variable based invoking not supported yet.\n");
    40874089        for(pVDesc=This->varlist; pVDesc; pVDesc=pVDesc->next) {
    40884090            if (pVDesc->vardesc.memid == memid) {
    4089                 FIXME("varseek: Found memid name %s\n",debugstr_w(((LPWSTR)pVDesc->Name)));
     4091                FIXME("varseek: Found memid name %s, but variable-based invoking not supported\n",debugstr_w(((LPWSTR)pVDesc->Name)));
    40904092                dump_TLBVarDesc(pVDesc);
    40914093                break;
     
    40934095        }
    40944096    }
    4095     FIXME("Did not find member id %d!\n",(int)memid);
     4097    /* not found, look for it in inherited interfaces */
     4098    if (This->TypeAttr.typekind==TKIND_INTERFACE && This->TypeAttr.cImplTypes) {
     4099        /* recursive search */
     4100        ITypeInfo *pTInfo;
     4101        HRESULT hr;
     4102        hr=ITypeInfo_GetRefTypeInfo(iface, This->impltypelist->hRef, &pTInfo);
     4103        if(SUCCEEDED(hr)){
     4104            hr=ITypeInfo_Invoke(pTInfo,pIUnk,memid,dwFlags,pDispParams,pVarResult,pExcepInfo,pArgErr);
     4105            ITypeInfo_Release(pTInfo);
     4106            return hr;
     4107        }
     4108        WARN("Could not search inherited interface!\n");
     4109    }
     4110    ERR("did not find member id %d, flags %d!\n", (int)memid, dwFlags);
    40964111    return DISP_E_MEMBERNOTFOUND;
    40974112}
  • trunk/src/oleaut32/variant.c

    r6944 r6952  
    15771577        break;
    15781578
     1579        case( VT_UNKNOWN ):
     1580            if (vtFrom == VT_DISPATCH)
     1581            {
     1582                res = IDispatch_QueryInterface(V_DISPATCH(ps), &IID_IUnknown, (LPVOID*)&V_UNKNOWN(pd));
     1583            }
     1584            else
     1585            {
     1586                res = DISP_E_TYPEMISMATCH;
     1587                FIXME("Coercion from %d to %d\n", vtFrom, vt );
     1588            }
     1589            break;
     1590
    15791591        default:
    15801592                res = DISP_E_TYPEMISMATCH;
Note: See TracChangeset for help on using the changeset viewer.