Changeset 8620 for trunk/src/ole32/bindctx.c
- Timestamp:
- Jun 9, 2002, 6:37:22 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/bindctx.c
r8441 r8620 33 33 34 34 /* represent the first size table and it's increment block size */ 35 #define BLOCK_TAB_SIZE 10 35 #define BLOCK_TAB_SIZE 10 36 36 #define MAX_TAB_SIZE 0xFFFFFFFF 37 37 … … 51 51 52 52 ICOM_VFIELD(IBindCtx); /* VTable relative to the IBindCtx interface.*/ 53 53 54 54 ULONG ref; /* reference counter for this object */ 55 55 … … 115 115 if ( (This==0) || (ppvObject==0) ) 116 116 return E_INVALIDARG; 117 117 118 118 /* Initialize the return parameter.*/ 119 119 *ppvObject = 0; … … 129 129 if ((*ppvObject)==0) 130 130 return E_NOINTERFACE; 131 131 132 132 /* Query Interface always increases the reference count by one when it is successful */ 133 133 BindCtxImpl_AddRef(iface); … … 168 168 return 0; 169 169 } 170 return This->ref; ;170 return This->ref; 171 171 } 172 172 … … 236 236 if (punk==NULL) 237 237 return E_POINTER; 238 238 239 239 IUnknown_AddRef(punk); 240 240 241 241 /* put the object in the first free element in the table */ 242 242 This->bindCtxTable[lastIndex].pObj = punk; … … 276 276 /* check if the object was registred or not */ 277 277 if (BindCtxImpl_GetObjectIndex(This,punk,NULL,&index)==S_FALSE) 278 278 279 279 return MK_E_NOTBOUND; 280 280 281 281 IUnknown_Release(This->bindCtxTable[index].pObj); 282 282 283 283 /* left-shift all elements in the right side of the current revoked object */ 284 284 for(j=index; j<This->bindCtxTableLastIndex-1; j++) 285 285 This->bindCtxTable[j]= This->bindCtxTable[j+1]; 286 286 287 287 This->bindCtxTableLastIndex--; 288 288 … … 320 320 if (pbindopts==NULL) 321 321 return E_POINTER; 322 322 323 323 if (pbindopts->cbStruct > sizeof(BIND_OPTS2)) 324 324 { … … 364 364 if (pprot==NULL) 365 365 return E_POINTER; 366 366 367 367 res=GetRunningObjectTable(0, pprot); 368 368 … … 381 381 if (punk==NULL) 382 382 return E_INVALIDARG; 383 383 384 384 IUnknown_AddRef(punk); 385 385 … … 402 402 403 403 This->bindCtxTableLastIndex++; 404 404 405 405 if (This->bindCtxTableLastIndex == This->bindCtxTableSize){ /* table is full ! must be resized */ 406 406 … … 432 432 433 433 *punk=0; 434 434 435 435 if (BindCtxImpl_GetObjectIndex(This,NULL,pszkey,&index)==S_FALSE) 436 436 return E_FAIL; 437 437 438 438 IUnknown_AddRef(This->bindCtxTable[index].pObj); 439 439 440 440 *punk = This->bindCtxTable[index].pObj; 441 441 … … 459 459 /* release the object if it's found */ 460 460 IUnknown_Release(This->bindCtxTable[index].pObj); 461 461 462 462 /* remove the object from the table with a left-shifting of all objects in the right side */ 463 463 for(j=index; j<This->bindCtxTableLastIndex-1; j++) 464 464 This->bindCtxTable[j]= This->bindCtxTable[j+1]; 465 465 466 466 This->bindCtxTableLastIndex--; 467 467 … … 489 489 DWORD i; 490 490 BYTE found=0; 491 491 492 492 TRACE("(%p,%p,%p,%p)\n",This,punk,pszkey,index); 493 493
Note:
See TracChangeset
for help on using the changeset viewer.