Changeset 6952 for trunk/src/oleaut32
- Timestamp:
- Oct 6, 2001, 10:56:18 AM (24 years ago)
- Location:
- trunk/src/oleaut32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/oleaut32/typelib.c
r6944 r6952 123 123 return S_OK; 124 124 } 125 #endif 126 125 #endif 127 126 /**************************************************************************** 128 127 * QueryPathOfRegTypeLib [OLEAUT32.164] … … 558 557 } 559 558 560 #if def __WIN32OS2__559 #ifndef __WIN32OS2__ 561 560 /**************************************************************************** 562 561 * OaBuildVersion (TYPELIB.15) … … 596 595 } 597 596 #endif 597 598 598 /* for better debugging info leave the static out for the time being */ 599 599 #define static … … 780 780 //#define TYPELIBDEBUG 781 781 #if defined(__WIN32OS2__) && defined(TYPELIBDEBUG) 782 782 783 /* 783 784 debug … … 1883 1884 { 1884 1885 *ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength); 1885 ITypeLib2_AddRef(*ppTypeLib);1886 1886 } 1887 1887 else if ( dwSignature == SLTG_SIGNATURE) 1888 1888 { 1889 1889 *ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength); 1890 ITypeLib2_AddRef(*ppTypeLib);1891 1890 } 1892 1891 UnmapViewOfFile(pBase); … … 1921 1920 { 1922 1921 *ppTypeLib = ITypeLib2_Constructor_MSFT(pBase, dwTLBLength); 1923 ITypeLib2_AddRef(*ppTypeLib);1924 1922 } 1925 1923 else if ( dwSignature == SLTG_SIGNATURE) 1926 1924 { 1927 1925 *ppTypeLib = ITypeLib2_Constructor_SLTG(pBase, dwTLBLength); 1928 ITypeLib2_AddRef(*ppTypeLib);1929 1926 } 1930 1927 else … … 2415 2412 } 2416 2413 2417 static char *SLTG_DoImpls( SLTG_ImplInfo *info, ITypeInfoImpl *pTI,2414 static char *SLTG_DoImpls(char *pBlk, ITypeInfoImpl *pTI, 2418 2415 BOOL OneOnly) 2419 2416 { 2417 SLTG_ImplInfo *info; 2420 2418 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; 2422 2427 while(1) { 2423 2428 *ppImplType = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, … … 2432 2437 if(OneOnly) 2433 2438 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 */ 2437 2442 return (char*)info; 2438 2443 } … … 2456 2461 2457 2462 if(*(WORD*)pFirstItem == SLTG_IMPL_MAGIC) { 2458 pNextItem = SLTG_DoImpls( (SLTG_ImplInfo*)pFirstItem, pTI, FALSE);2463 pNextItem = SLTG_DoImpls(pFirstItem, pTI, FALSE); 2459 2464 } 2460 2465 … … 2483 2488 2484 2489 if(*(WORD*)pFirstItem == SLTG_IMPL_MAGIC) { 2485 pNextItem = SLTG_DoImpls( (SLTG_ImplInfo*)pFirstItem, pTI, TRUE);2490 pNextItem = SLTG_DoImpls(pFirstItem, pTI, TRUE); 2486 2491 } 2487 2492 … … 3847 3852 TLBVarDesc * pVDesc; 3848 3853 HRESULT ret=S_OK; 3849 UINT nNameLen = SysStringLen(*rgszNames); 3850 3854 3851 3855 TRACE("(%p) Name %s cNames %d\n", This, debugstr_w(*rgszNames), 3852 3856 cNames); 3853 3857 for(pFDesc=This->funclist; pFDesc; pFDesc=pFDesc->next) { 3854 3858 int i, j; 3855 if( !memcmp(*rgszNames, pFDesc->Name, nNameLen)) {3859 if(!lstrcmpiW(*rgszNames, pFDesc->Name)) { 3856 3860 if(cNames) *pMemId=pFDesc->funcdesc.memid; 3857 3861 for(i=1; i < cNames; i++){ 3858 UINT nParamLen = SysStringLen(rgszNames[i]);3859 3862 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)) 3861 3864 break; 3862 3865 if( j<pFDesc->funcdesc.cParams) … … 3869 3872 } 3870 3873 for(pVDesc=This->varlist; pVDesc; pVDesc=pVDesc->next) { 3871 if( !memcmp(*rgszNames, pVDesc->Name, nNameLen)) {3874 if(!lstrcmpiW(*rgszNames, pVDesc->Name)) { 3872 3875 if(cNames) *pMemId=pVDesc->vardesc.memid; 3873 3876 return ret; … … 3984 3987 for(pFDesc=This->funclist; pFDesc; pFDesc=pFDesc->next) 3985 3988 if (pFDesc->funcdesc.memid == memid) { 3986 if (pFDesc->funcdesc.invkind & (dwFlags & ~DISPATCH_METHOD))3989 if (pFDesc->funcdesc.invkind & dwFlags) 3987 3990 break; 3988 3991 } … … 4000 4003 if (i<pDispParams->cArgs) { 4001 4004 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]), 4003 4006 pFDesc->funcdesc.lprgelemdescParam[i].tdesc.vt 4004 4007 ); 4005 args[i+1] = V_UNION( pDispParams->rgvarg+i,lVal);4008 args[i+1] = V_UNION(&pDispParams->rgvarg[pDispParams->cArgs-i-1],lVal); 4006 4009 } else { 4007 4010 TYPEDESC *tdesc = &(pFDesc->funcdesc.lprgelemdescParam[i].tdesc); … … 4084 4087 } 4085 4088 } else { 4086 FIXME("variable based invoking not supported yet.\n");4087 4089 for(pVDesc=This->varlist; pVDesc; pVDesc=pVDesc->next) { 4088 4090 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))); 4090 4092 dump_TLBVarDesc(pVDesc); 4091 4093 break; … … 4093 4095 } 4094 4096 } 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); 4096 4111 return DISP_E_MEMBERNOTFOUND; 4097 4112 } -
trunk/src/oleaut32/variant.c
r6944 r6952 1577 1577 break; 1578 1578 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 1579 1591 default: 1580 1592 res = DISP_E_TYPEMISMATCH;
Note:
See TracChangeset
for help on using the changeset viewer.
