Ignore:
Timestamp:
Sep 15, 2001, 11:32:00 AM (24 years ago)
Author:
sandervl
Message:

restored old version + wine update

File:
1 edited

Legend:

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

    r6648 r6711  
    1 /* $Id: bindctx.c,v 1.2 2001-09-05 13:17:07 bird Exp $ */
    21/***************************************************************************************
    3  *                        BindCtx implementation
     2 *                            BindCtx implementation
    43 *
    54 *  Copyright 1999  Noomen Hamza
     
    1817#include "heap.h"
    1918
     19#ifdef __WIN32OS2__
     20#undef FIXME
     21#undef TRACE
     22#ifdef DEBUG
     23#define TRACE WriteLog("OLE32: %s", __FUNCTION__); WriteLog
     24#define FIXME WriteLog("FIXME OLE32: %s", __FUNCTION__); WriteLog
     25#else
     26#define TRACE 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
     27#define FIXME 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL)
     28#endif
     29#endif
     30
    2031DEFAULT_DEBUG_CHANNEL(ole);
    2132
    2233/* represent the first size table and it's increment block size */
    23 #define  BLOCK_TAB_SIZE 10
     34#define  BLOCK_TAB_SIZE 10 
    2435#define  MAX_TAB_SIZE   0xFFFFFFFF
    2536
     
    3950
    4051    ICOM_VFIELD(IBindCtx); /* VTable relative to the IBindCtx interface.*/
    41 
     52                                     
    4253    ULONG ref; /* reference counter for this object */
    4354
     
    103114  if ( (This==0) || (ppvObject==0) )
    104115      return E_INVALIDARG;
    105 
     116 
    106117  /* Initialize the return parameter.*/
    107118  *ppvObject = 0;
     
    117128  if ((*ppvObject)==0)
    118129      return E_NOINTERFACE;
    119 
     130 
    120131   /* Query Interface always increases the reference count by one when it is successful */
    121132  BindCtxImpl_AddRef(iface);
     
    224235    if (punk==NULL)
    225236        return E_POINTER;
    226 
     237   
    227238    IUnknown_AddRef(punk);
    228 
     239   
    229240    /* put the object in the first free element in the table */
    230241    This->bindCtxTable[lastIndex].pObj = punk;
     
    264275    /* check if the object was registred or not */
    265276    if (BindCtxImpl_GetObjectIndex(This,punk,NULL,&index)==S_FALSE)
    266 
     277       
    267278        return MK_E_NOTBOUND;
    268279
    269280    IUnknown_Release(This->bindCtxTable[index].pObj);
    270 
     281   
    271282    /* left-shift all elements in the right side of the current revoked object */
    272283    for(j=index; j<This->bindCtxTableLastIndex-1; j++)
    273284        This->bindCtxTable[j]= This->bindCtxTable[j+1];
    274 
     285   
    275286    This->bindCtxTableLastIndex--;
    276287
     
    308319    if (pbindopts==NULL)
    309320        return E_POINTER;
    310 
     321   
    311322    if (pbindopts->cbStruct > sizeof(BIND_OPTS2))
    312323    {
     
    352363    if (pprot==NULL)
    353364        return E_POINTER;
    354 
     365   
    355366    res=GetRunningObjectTable(0, pprot);
    356367
     
    369380    if (punk==NULL)
    370381        return E_INVALIDARG;
    371 
     382   
    372383    IUnknown_AddRef(punk);
    373384
     
    390401
    391402    This->bindCtxTableLastIndex++;
    392 
     403   
    393404    if (This->bindCtxTableLastIndex == This->bindCtxTableSize){ /* table is full ! must be resized */
    394405
     
    420431
    421432    *punk=0;
    422 
     433   
    423434    if (BindCtxImpl_GetObjectIndex(This,NULL,pszkey,&index)==S_FALSE)
    424435        return E_FAIL;
    425436
    426437    IUnknown_AddRef(This->bindCtxTable[index].pObj);
    427 
     438   
    428439    *punk = This->bindCtxTable[index].pObj;
    429440
     
    447458    /* release the object if it's found */
    448459    IUnknown_Release(This->bindCtxTable[index].pObj);
    449 
     460   
    450461    /* remove the object from the table with a left-shifting of all objects in the right side */
    451462    for(j=index; j<This->bindCtxTableLastIndex-1; j++)
    452463        This->bindCtxTable[j]= This->bindCtxTable[j+1];
    453 
     464   
    454465    This->bindCtxTableLastIndex--;
    455466
     
    477488    DWORD i;
    478489    BYTE found=0;
    479 
     490   
    480491    TRACE("(%p,%p,%p,%p)\n",This,punk,pszkey,index);
    481492
Note: See TracChangeset for help on using the changeset viewer.