I've been compiling COM code that uses the Running
Object Table and the interface description in objidl.h
is incorrect and fails to link properly. Attached is a
patch file to correct the interface definition.
Also attached is a patch to wtypes.h to add in the
flags that are needed for registering objects with the
Running Object Table.
context diff
context diff
Logged In: YES
user_id=11494
I've found documentaion to justify the objidl.h patch but
am unable to find any on the ROT* flags in wtypes.h. Can
you help.
Danny
Logged In: YES
user_id=202636
From the MSDN for IRunningObjectTable::Register at
http://msdn.microsoft.com//library/en-us/wcedcom/htm/cerefIRunningObjectTableRegister.asp
"The grfFlags parameter accepts two flag settings:
ROTFLAGS_REGISTRATIONKEEPSALIVE. When set, indicates a
strong registration for the object.
ROTFLAGS_ALLOWANYCLIENT. When set, any client can connect to
the running object through its entry in the ROT. When not
set, only clients in the window station that registered the
object can connect to it.
When an object is registered, the ROT always calls AddRef on
the object. For a weak registration
(ROTFLAGS_REGISTRATIONKEEPSALIVE not set), the ROT will
release the object whenever the last strong reference to the
object is released. For a strong registration
(ROTFLAGS_REGISTRATIONKEEPSALIVE set), the ROT prevents the
object from being destroyed until the objects registration
is explicitly revoked. "
I can't find anything for the values themselves. I don't
know if you have a standard method for finding #define
values without requiring the use of microsoft headers (if
this is necessary).
Logged In: YES
user_id=11494
Thanks
I've committed this to CVS. If you can find documnetation
on ROT_COMPARE_MAX, I'll put that in as well.
diff -u -p -r1.163 ChangeLog
--- ChangeLog 2002/03/31 20:45:37 1.163
+++ ChangeLog 2002/04/02 08:54:34
@@ -1,3 +1,10 @@
+2002-04-02 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * include/objidl.h (IRunningObjectTable.Register):
Correct
+ prototype.
+ * include/wtypes.h (ROTFLAGS_REGISTRATIONKEEPSALIVE,
+ ROTFLAGS_ALLOWANYCLIENT): Add defines.
+
2002-03-31 Victor Porton <porton@narod.ru>
define.
Index: include/objidl.h
============================================================
=======
RCS file: /cvs/src/src/winsup/w32api/include/objidl.h,v
retrieving revision 1.6
diff -u -p -r1.6 objidl.h
--- objidl.h 2002/03/09 09:04:09 1.6
+++ objidl.h 2002/04/02 08:54:39
@@ -561,7 +561,7 @@ DECLARE_INTERFACE_(IRunningObjectTable,I
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Register)(THIS_
LPUNKNOWN,LPMONIKER,PDWORD) PURE;
+ STDMETHOD(Register)(THIS_
DWORD,LPUNKNOWN,LPMONIKER,PDWORD) PURE;
STDMETHOD(Revoke)(THIS_ DWORD) PURE;
STDMETHOD(IsRunning)(THIS_ LPMONIKER) PURE;
STDMETHOD(GetObject)(THIS_ LPMONIKER,LPUNKNOWN*)
PURE;
Index: include/wtypes.h
============================================================
=======
RCS file: /cvs/src/src/winsup/w32api/include/wtypes.h,v
retrieving revision 1.7
diff -u -p -r1.7 wtypes.h
--- wtypes.h 2002/03/09 09:04:10 1.7
+++ wtypes.h 2002/04/02 08:54:39
@@ -15,6 +15,9 @@ extern "C" {
#define CBPCLIPDATA(d) ((d).cbSize-sizeof((d).ulClipFmt))
#define DECIMAL_NEG ((BYTE)0x80)
#define DECIMAL_SETZERO(d) {(d).Lo64=(d).Hi32=
(d).signscale=0;}
+#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x01
+#define ROTFLAGS_ALLOWANYCLIENT 0x02
+
#ifndef __BLOB_T_DEFINED /* also in winsock2.h */
#define __BLOB_T_DEFINED
typedef struct _BLOB {