Ignore:
Timestamp:
Jun 9, 2002, 6:37:22 PM (23 years ago)
Author:
sandervl
Message:

Resync with latest Wine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/bindctx.c

    r8441 r8620  
    3333
    3434/* represent the first size table and it's increment block size */
    35 #define  BLOCK_TAB_SIZE 10 
     35#define  BLOCK_TAB_SIZE 10
    3636#define  MAX_TAB_SIZE   0xFFFFFFFF
    3737
     
    5151
    5252    ICOM_VFIELD(IBindCtx); /* VTable relative to the IBindCtx interface.*/
    53                                      
     53
    5454    ULONG ref; /* reference counter for this object */
    5555
     
    115115  if ( (This==0) || (ppvObject==0) )
    116116      return E_INVALIDARG;
    117  
     117
    118118  /* Initialize the return parameter.*/
    119119  *ppvObject = 0;
     
    129129  if ((*ppvObject)==0)
    130130      return E_NOINTERFACE;
    131  
     131
    132132   /* Query Interface always increases the reference count by one when it is successful */
    133133  BindCtxImpl_AddRef(iface);
     
    168168        return 0;
    169169    }
    170     return This->ref;;
     170    return This->ref;
    171171}
    172172
     
    236236    if (punk==NULL)
    237237        return E_POINTER;
    238    
     238
    239239    IUnknown_AddRef(punk);
    240    
     240
    241241    /* put the object in the first free element in the table */
    242242    This->bindCtxTable[lastIndex].pObj = punk;
     
    276276    /* check if the object was registred or not */
    277277    if (BindCtxImpl_GetObjectIndex(This,punk,NULL,&index)==S_FALSE)
    278        
     278
    279279        return MK_E_NOTBOUND;
    280280
    281281    IUnknown_Release(This->bindCtxTable[index].pObj);
    282    
     282
    283283    /* left-shift all elements in the right side of the current revoked object */
    284284    for(j=index; j<This->bindCtxTableLastIndex-1; j++)
    285285        This->bindCtxTable[j]= This->bindCtxTable[j+1];
    286    
     286
    287287    This->bindCtxTableLastIndex--;
    288288
     
    320320    if (pbindopts==NULL)
    321321        return E_POINTER;
    322    
     322
    323323    if (pbindopts->cbStruct > sizeof(BIND_OPTS2))
    324324    {
     
    364364    if (pprot==NULL)
    365365        return E_POINTER;
    366    
     366
    367367    res=GetRunningObjectTable(0, pprot);
    368368
     
    381381    if (punk==NULL)
    382382        return E_INVALIDARG;
    383    
     383
    384384    IUnknown_AddRef(punk);
    385385
     
    402402
    403403    This->bindCtxTableLastIndex++;
    404    
     404
    405405    if (This->bindCtxTableLastIndex == This->bindCtxTableSize){ /* table is full ! must be resized */
    406406
     
    432432
    433433    *punk=0;
    434    
     434
    435435    if (BindCtxImpl_GetObjectIndex(This,NULL,pszkey,&index)==S_FALSE)
    436436        return E_FAIL;
    437437
    438438    IUnknown_AddRef(This->bindCtxTable[index].pObj);
    439    
     439
    440440    *punk = This->bindCtxTable[index].pObj;
    441441
     
    459459    /* release the object if it's found */
    460460    IUnknown_Release(This->bindCtxTable[index].pObj);
    461    
     461
    462462    /* remove the object from the table with a left-shifting of all objects in the right side */
    463463    for(j=index; j<This->bindCtxTableLastIndex-1; j++)
    464464        This->bindCtxTable[j]= This->bindCtxTable[j+1];
    465    
     465
    466466    This->bindCtxTableLastIndex--;
    467467
     
    489489    DWORD i;
    490490    BYTE found=0;
    491    
     491
    492492    TRACE("(%p,%p,%p,%p)\n",This,punk,pszkey,index);
    493493
Note: See TracChangeset for help on using the changeset viewer.