Changeset 6711 for trunk/src/ole32/moniker.c
- Timestamp:
- Sep 15, 2001, 11:32:00 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ole32/moniker.c
r6648 r6711 1 /* $Id: moniker.c,v 1.3 2001-09-05 13:17:10 bird Exp $ */2 1 /* 3 * 2 * Monikers 4 3 * 5 * Copyright 1998Marcus Meissner4 * Copyright 1998 Marcus Meissner 6 5 * Copyright 1999 Noomen Hamza 7 6 */ … … 23 22 #include "compobj_private.h" 24 23 24 #ifdef __WIN32OS2__ 25 #undef FIXME 26 #undef TRACE 27 #ifdef DEBUG 28 #define TRACE WriteLog("OLE32: %s", __FUNCTION__); WriteLog 29 #define FIXME WriteLog("FIXME OLE32: %s", __FUNCTION__); WriteLog 30 #else 31 #define TRACE 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL) 32 #define FIXME 1 ? (void)0 : (void)((int (*)(char *, ...)) NULL) 33 #endif 34 #endif 35 25 36 DEFAULT_DEBUG_CHANNEL(ole); 26 37 … … 47 58 DWORD runObjTabLastIndx; /* first free index element in the table. */ 48 59 DWORD runObjTabRegister; /* registration key of the next registered object */ 49 60 50 61 } RunningObjectTableImpl; 51 62 … … 137 148 { 138 149 TRACE("()\n"); 139 150 140 151 if (runningObjectTableInstance==NULL) 141 152 return E_INVALIDARG; … … 170 181 if (( This->runObjTab[i].regTypeObj & ROTFLAGS_REGISTRATIONKEEPSALIVE) != 0) 171 182 IUnknown_Release(This->runObjTab[i].pObj); 172 183 173 184 IMoniker_Release(This->runObjTab[i].pmkObj); 174 185 } … … 230 241 if (runningObjectTableInstance==NULL) 231 242 return E_POINTER; 232 243 233 244 RunningObjectTableImpl_Release((IRunningObjectTable*)runningObjectTableInstance); 234 245 … … 271 282 This->runObjTab[This->runObjTabLastIndx].identRegObj = This->runObjTabRegister; 272 283 CoFileTimeNow(&(This->runObjTab[This->runObjTabLastIndx].lastModifObj)); 273 284 274 285 /* gives a registration identifier to the registered object*/ 275 286 (*pdwRegister)= This->runObjTabRegister; … … 278 289 279 290 FIXME("runObjTabRegister: %ld is out of data limite \n",This->runObjTabRegister); 280 291 return E_FAIL; 281 292 } 282 293 This->runObjTabRegister++; 283 294 This->runObjTabLastIndx++; 284 295 285 296 if (This->runObjTabLastIndx == This->runObjTabSize){ /* table is full ! so it must be resized */ 286 297 … … 296 307 297 308 IMoniker_AddRef(pmkObjectName); 298 309 299 310 return res; 300 311 } … … 322 333 323 334 IMoniker_Release(This->runObjTab[index].pmkObj); 324 335 325 336 /* remove the object from the table */ 326 337 for(j=index; j<This->runObjTabLastIndx-1; j++) 327 338 This->runObjTab[j]= This->runObjTab[j+1]; 328 339 329 340 This->runObjTabLastIndx--; 330 341 … … 337 348 HRESULT WINAPI RunningObjectTableImpl_IsRunning( IRunningObjectTable* iface, 338 349 IMoniker *pmkObjectName) /* Pointer to the moniker of the object whose status is desired */ 339 { 350 { 340 351 ICOM_THIS(RunningObjectTableImpl,iface); 341 352 … … 359 370 if (ppunkObject==NULL) 360 371 return E_POINTER; 361 372 362 373 *ppunkObject=0; 363 374 … … 394 405 return S_OK; 395 406 } 396 407 397 408 /*********************************************************************** 398 409 * RunningObjectTable_GetTimeOfLastChange … … 448 459 /* search object identified by a register identifier */ 449 460 for(i=0;((i<This->runObjTabLastIndx)&&(This->runObjTab[i].identRegObj!=identReg));i++); 450 461 451 462 if (i==This->runObjTabLastIndx) return S_FALSE; 452 463 … … 457 468 458 469 /****************************************************************************** 459 * GetRunningObjectTable16[OLE2.30]470 * GetRunningObjectTable16 [OLE2.30] 460 471 */ 461 472 HRESULT WINAPI GetRunningObjectTable16(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot) 462 473 { 463 474 FIXME("(%ld,%p),stub!\n",reserved,pprot); 464 475 return E_NOTIMPL; 465 476 } … … 491 502 HRESULT WINAPI OleRun(LPUNKNOWN pUnknown) 492 503 { 493 IRunnableObject 504 IRunnableObject *runable; 494 505 ICOM_THIS(IRunnableObject,pUnknown); 495 LRESULT 506 LRESULT ret; 496 507 497 508 #ifdef __WIN32OS2__ … … 502 513 503 514 ret = IRunnableObject_QueryInterface(This,&IID_IRunnableObject,(LPVOID*)&runable); 504 if (ret) 505 515 if (ret) 516 return 0; /* Appears to return no error. */ 506 517 ret = IRunnableObject_Run(runable,NULL); 507 518 IRunnableObject_Release(runable); … … 513 524 */ 514 525 HRESULT WINAPI MkParseDisplayName(LPBC pbc, LPCOLESTR szUserName, 515 526 LPDWORD pchEaten, LPMONIKER *ppmk) 516 527 { 517 528 FIXME("(%p, %s, %p, %p): stub.\n", pbc, debugstr_w(szUserName), pchEaten, *ppmk); 518 529 if (!(IsValidInterface((LPUNKNOWN) pbc))) 519 530 return E_INVALIDARG; 520 531 521 532 return MK_E_SYNTAX;
Note:
See TracChangeset
for help on using the changeset viewer.