Changeset 5845 for trunk/src


Ignore:
Timestamp:
May 31, 2001, 9:14:00 AM (24 years ago)
Author:
sandervl
Message:

updates

Location:
trunk/src/oleaut32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/oleaut32/asmutil.asm

    r5840 r5845  
    1 ; $Id: asmutil.asm,v 1.1 2001-05-30 17:43:38 sandervl Exp $
     1; $Id: asmutil.asm,v 1.2 2001-05-31 07:14:00 sandervl Exp $
    22
    33;
     
    4545              mov ebx, dword ptr [eax]
    4646              push ebx
    47               add eax, 4
     47              sub eax, 4
    4848
    4949              dec ecx
     
    7272              mov ebx, dword ptr [eax]
    7373              push ebx
    74               add eax, 4
     74              sub eax, 4
    7575
    7676              dec ecx
  • trunk/src/oleaut32/itypeinfo.cpp

    r5840 r5845  
    1 /* $Id: itypeinfo.cpp,v 1.6 2001-05-30 17:43:38 sandervl Exp $ */
     1/* $Id: itypeinfo.cpp,v 1.7 2001-05-31 07:14:00 sandervl Exp $ */
    22/*
    33 * ITypeInfo interface
     
    347347    dprintf(("OLEAUT32: ITypeInfoImpl(%p)->GetRefTypeOfImplType()\n", This));
    348348
    349     if (This->pImplements.Count() < index)
     349    if(index==(UINT)-1)
     350    {
     351      /* only valid on dual interfaces;
     352         retrieve the associated TKIND_INTERFACE handle for the current TKIND_DISPATCH
     353      */
     354      if( This->TypeAttr.typekind != TKIND_DISPATCH) return E_INVALIDARG;
     355     
     356      if (This->TypeAttr.wTypeFlags & TYPEFLAG_FDISPATCHABLE &&
     357          This->TypeAttr.wTypeFlags & TYPEFLAG_FDUAL )
     358      {
     359        *pRefType = -1;
     360      }
     361      else
     362      {
     363        if (This->pImplements.Count() == 0) return TYPE_E_ELEMENTNOTFOUND;
     364        *pRefType = This->pImplements[0]->reference;
     365      }
     366    }
     367    else
     368    {
     369      if (This->pImplements.Count() < index)
    350370        return TYPE_E_ELEMENTNOTFOUND;
    351371
    352     *pRefType = This->pImplements[index]->reference;
     372      *pRefType = This->pImplements[index]->reference;
     373    }
    353374    return S_OK;
    354375}
     
    667688        * (DWORD*) pStackPtr = * (DWORD*) pIUnk;
    668689        paramsize += sizeof(DWORD);
     690
     691        //reset to top
     692        pStackPtr  = (PBYTE)((char *)pStack + sizeof(double)*pFuncDesc->cParams);
     693        pStackPtr -= 4;
    669694
    670695         /* invoke function */
     
    10491074        return rc;
    10501075    }
     1076    else
     1077    if (hRefType == -1 &&
     1078       (((ITypeInfoImpl*) This)->TypeAttr.typekind   == TKIND_DISPATCH) &&
     1079       (((ITypeInfoImpl*) This)->TypeAttr.wTypeFlags &  TYPEFLAG_FDUAL))
     1080    {
     1081          /* when we meet a DUAL dispinterface, we must create the interface
     1082          * version of it.
     1083          */
     1084          ITypeInfoImpl* pTypeInfoImpl = (ITypeInfoImpl*) ITypeInfoImpl_Constructor();
     1085       
     1086          /* the interface version contains the same information as the dispinterface
     1087           * copy the contents of the structs.
     1088           */
     1089          *pTypeInfoImpl = *This;
     1090          pTypeInfoImpl->ref = 1;
     1091               
     1092          /* change the type to interface */
     1093          pTypeInfoImpl->TypeAttr.typekind = TKIND_INTERFACE;
     1094               
     1095          *ppTInfo = (ITypeInfo*) pTypeInfoImpl;
     1096
     1097          ITypeInfo_AddRef((ITypeInfo*) pTypeInfoImpl);
     1098
     1099          return S_OK;
     1100    }
    10511101
    10521102    /* imported type lib */
Note: See TracChangeset for help on using the changeset viewer.