DCOM: Document wrong behaviour for IRunningObjectTable

Robert Shearman rob at codeweavers.com
Wed Jul 28 04:52:54 CDT 2004


Changelog:
Document wrong behaviour for IRunningObjectTable.

-------------- next part --------------
Index: wine/dlls/ole32/moniker.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/moniker.c,v
retrieving revision 1.30
diff -u -r1.30 moniker.c
--- wine/dlls/ole32/moniker.c	21 May 2004 20:52:57 -0000	1.30
+++ wine/dlls/ole32/moniker.c	28 Jul 2004 09:48:52 -0000
@@ -17,6 +17,14 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * TODO:
+ * - IRunningObjectTable should work interprocess, but currently doesn't.
+ *   Native (on Win2k at least) uses an undocumented RPC interface, IROT, to
+ *   communicate with RPCSS which contains the table of marshalled data.
+ * - IRunningObjectTable should use marshalling instead of simple ref
+ *   counting as there is the possibility of using the running object table
+ *   to access objects in other apartments.
  */
 
 #include <assert.h>
@@ -302,9 +310,12 @@
             return E_OUTOFMEMORY;
     }
     /* add a reference to the object in the strong registration case */
-    if ((grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) !=0 )
+    if ((grfFlags & ROTFLAGS_REGISTRATIONKEEPSALIVE) !=0 ) {
+        TRACE("strong registration, reffing %p\n", punkObject);
+        /* this is wrong; we should always add a reference to the object */
         IUnknown_AddRef(punkObject);
-
+    }
+    
     IMoniker_AddRef(pmkObjectName);
 
     return res;
@@ -328,9 +339,12 @@
         return E_INVALIDARG;
 
     /* release the object if it was registered with a strong registrantion option */
-    if ((This->runObjTab[index].regTypeObj & ROTFLAGS_REGISTRATIONKEEPSALIVE)!=0)
+    if ((This->runObjTab[index].regTypeObj & ROTFLAGS_REGISTRATIONKEEPSALIVE)!=0) {
+        TRACE("releasing %p\n", This->runObjTab[index].pObj);
+        /* this is also wrong; we should always release the object (see above) */
         IUnknown_Release(This->runObjTab[index].pObj);
-
+    }
+    
     IMoniker_Release(This->runObjTab[index].pmkObj);
 
     /* remove the object from the table */
@@ -373,8 +387,10 @@
     *ppunkObject=0;
 
     /* verify if the object was registered before or not */
-    if (RunningObjectTableImpl_GetObjectIndex(This,-1,pmkObjectName,&index)==S_FALSE)
+    if (RunningObjectTableImpl_GetObjectIndex(This,-1,pmkObjectName,&index)==S_FALSE) {
+        WARN("Moniker unavailable - needs to work interprocess?\n");
         return MK_E_UNAVAILABLE;
+    }
 
     /* add a reference to the object then set output object argument */
     IUnknown_AddRef(This->runObjTab[index].pObj);


More information about the wine-patches mailing list