COM Header Cleanup

Robert Shearman rob at codeweavers.com
Thu Jul 22 16:35:59 CDT 2004


Hi,

The only functional change with this patch is the removal of the 
STUBMGR_Start() call when calling DllGetClassObject for the 
IPSFactoryBuffer interface, which is obviously not necessary since 
marshalling still works even when the rpcrt4 version of this interface 
is used instead and the IMarshal implementation calls STUBMGR_Start anyway.
The rest of the patch is concerned with trying to remove unneeded stuff 
from the compobj_private.h file.

Rob

Changelog:
- Remove unneeded STUBMGR_Start call
- Cleanup compobj_private.h

-------------- next part --------------
Index: wine/dlls/ole32/compobj_private.h
===================================================================
RCS file: /home/wine/wine/dlls/ole32/compobj_private.h,v
retrieving revision 1.13
diff -u -r1.13 compobj_private.h
--- wine/dlls/ole32/compobj_private.h	10 Feb 2004 01:36:20 -0000	1.13
+++ wine/dlls/ole32/compobj_private.h	22 Jul 2004 21:27:01 -0000
@@ -118,18 +118,9 @@
 
 extern void* StdGlobalInterfaceTableInstance;
 
-inline static HRESULT
-get_facbuf_for_iid(REFIID riid,IPSFactoryBuffer **facbuf) {
-    HRESULT       hres;
-    CLSID         pxclsid;
-
-    if ((hres = CoGetPSClsid(riid,&pxclsid)))
-	return hres;
-    return CoGetClassObject(&pxclsid,CLSCTX_INPROC_SERVER,NULL,&IID_IPSFactoryBuffer,(LPVOID*)facbuf);
-}
-
 #define PIPEPREF "\\\\.\\pipe\\"
 #define OLESTUBMGR PIPEPREF"WINE_OLE_StubMgr"
+
 /* Standard Marshalling definitions */
 typedef struct _wine_marshal_id {
     DWORD	processid;
@@ -156,40 +147,8 @@
 }
 
 HRESULT MARSHAL_Find_Stub_Buffer(wine_marshal_id *mid,IRpcStubBuffer **stub);
-HRESULT MARSHAL_Find_Stub_Server(wine_marshal_id *mid,LPUNKNOWN *punk);
-HRESULT MARSHAL_Register_Stub(wine_marshal_id *mid,LPUNKNOWN punk, IRpcStubBuffer *stub);
 
 HRESULT MARSHAL_GetStandardMarshalCF(LPVOID *ppv);
-
-typedef struct _wine_marshal_data {
-    DWORD	dwDestContext;
-    DWORD	mshlflags;
-} wine_marshal_data;
-
-
-#define REQTYPE_REQUEST		0
-typedef struct _wine_rpc_request_header {
-    DWORD		reqid;
-    wine_marshal_id	mid;
-    DWORD		iMethod;
-    DWORD		cbBuffer;
-} wine_rpc_request_header;
-
-#define REQTYPE_RESPONSE	1
-typedef struct _wine_rpc_response_header {
-    DWORD		reqid;
-    DWORD		cbBuffer;
-    DWORD		retval;
-} wine_rpc_response_header;
-
-#define REQSTATE_START			0
-#define REQSTATE_REQ_QUEUED		1
-#define REQSTATE_REQ_WAITING_FOR_REPLY	2
-#define REQSTATE_REQ_GOT		3
-#define REQSTATE_INVOKING		4
-#define REQSTATE_RESP_QUEUED		5
-#define REQSTATE_RESP_GOT		6
-#define REQSTATE_DONE			6
 
 void STUBMGR_Start();
 
Index: wine/dlls/ole32/marshal.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/marshal.c,v
retrieving revision 1.21
diff -u -r1.21 marshal.c
--- wine/dlls/ole32/marshal.c	22 Jul 2004 20:34:14 -0000	1.21
+++ wine/dlls/ole32/marshal.c	22 Jul 2004 21:27:02 -0000
@@ -58,6 +58,21 @@
  * Note that the IUnknown_QI(ob,xiid,&ppv) always returns the SAME ppv value!
  */
 
+inline static HRESULT
+get_facbuf_for_iid(REFIID riid,IPSFactoryBuffer **facbuf) {
+    HRESULT       hres;
+    CLSID         pxclsid;
+
+    if ((hres = CoGetPSClsid(riid,&pxclsid)))
+	return hres;
+    return CoGetClassObject(&pxclsid,CLSCTX_INPROC_SERVER,NULL,&IID_IPSFactoryBuffer,(LPVOID*)facbuf);
+}
+
+typedef struct _wine_marshal_data {
+    DWORD	dwDestContext;
+    DWORD	mshlflags;
+} wine_marshal_data;
+
 typedef struct _mid2unknown {
     wine_marshal_id	mid;
     LPUNKNOWN		pUnk;
Index: wine/dlls/ole32/oleproxy.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/oleproxy.c,v
retrieving revision 1.16
diff -u -r1.16 oleproxy.c
--- wine/dlls/ole32/oleproxy.c	14 Jun 2004 17:58:03 -0000	1.16
+++ wine/dlls/ole32/oleproxy.c	22 Jul 2004 21:27:02 -0000
@@ -512,10 +512,6 @@
     *ppv = NULL;
     if (IsEqualIID(rclsid,&CLSID_PSFactoryBuffer)) {
 	*ppv = &lppsfac;
-	/* If we create a ps factory, we might need a stub manager later
-	 * anyway
-	 */
-	STUBMGR_Start();
 	return S_OK;
     }
     if (IsEqualIID(rclsid,&CLSID_DfMarshal)&&(
Index: wine/dlls/ole32/rpc.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/rpc.c,v
retrieving revision 1.16
diff -u -r1.16 rpc.c
--- wine/dlls/ole32/rpc.c	22 Jul 2004 19:43:27 -0000	1.16
+++ wine/dlls/ole32/rpc.c	22 Jul 2004 21:27:02 -0000
@@ -50,6 +50,30 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(ole);
 
+#define REQTYPE_REQUEST		0
+typedef struct _wine_rpc_request_header {
+    DWORD		reqid;
+    wine_marshal_id	mid;
+    DWORD		iMethod;
+    DWORD		cbBuffer;
+} wine_rpc_request_header;
+
+#define REQTYPE_RESPONSE	1
+typedef struct _wine_rpc_response_header {
+    DWORD		reqid;
+    DWORD		cbBuffer;
+    DWORD		retval;
+} wine_rpc_response_header;
+
+#define REQSTATE_START			0
+#define REQSTATE_REQ_QUEUED		1
+#define REQSTATE_REQ_WAITING_FOR_REPLY	2
+#define REQSTATE_REQ_GOT		3
+#define REQSTATE_INVOKING		4
+#define REQSTATE_RESP_QUEUED		5
+#define REQSTATE_RESP_GOT		6
+#define REQSTATE_DONE			6
+
 typedef struct _wine_rpc_request {
     int				state;
     HANDLE			hPipe;	/* temp copy of handle */


More information about the wine-patches mailing list