RPCRT4: avoid non-standard types in rpcdcep.h

Mike McCormack mike at codeweavers.com
Thu Sep 2 12:44:48 CDT 2004


This solves a few more errors generated when trying to compile MIDL 
generated proxies with Wine.

Mike


ChangeLog:
* avoid non-standard types in rpcdcep.h
-------------- next part --------------
Index: include/rpcdcep.h
===================================================================
RCS file: /home/wine/wine/include/rpcdcep.h,v
retrieving revision 1.9
diff -u -r1.9 rpcdcep.h
--- include/rpcdcep.h	5 Sep 2003 23:15:44 -0000	1.9
+++ include/rpcdcep.h	2 Sep 2004 16:14:33 -0000
@@ -93,8 +93,6 @@
 #define TRANSPORT_TYPE_LPC  0x04
 #define TRANSPORT_TYPE_WMSG 0x08
 
-typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, HANDLE hSyncEvent);
-
 RPCRTAPI RPC_STATUS RPC_ENTRY
   I_RpcGetBuffer( RPC_MESSAGE* Message );
 RPCRTAPI RPC_STATUS RPC_ENTRY
@@ -116,8 +114,23 @@
 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
   I_RpcGetCurrentCallHandle( void );
 
+/*
+ * The platform SDK headers don't define these functions at all if WINNT is defined
+ * The MSVC6 headers define two different sets of functions :
+ *  If WINNT and MSWMSG are defined, the NT versions are defined
+ *  If WINNT is not defined, the windows 9x versions are defined.
+ * Note that the prototypes for I_RpcBindingSetAsync are different for each case.
+ *
+ * Wine defaults to the WinNT case and only defines these function is MSWMSG is
+ *  defined. Defining the NT functions by default causes MIDL generated proxys
+ *  to not compile.
+ */
+
+#if 1  /* WINNT */
+#ifdef MSWMSG
+
 RPCRTAPI RPC_STATUS RPC_ENTRY
-  I_RpcServerStartListening( void* hWnd );
+  I_RpcServerStartListening( HWND hWnd );
 RPCRTAPI RPC_STATUS RPC_ENTRY
   I_RpcServerStopListening( void );
 /* WINNT */
@@ -126,21 +139,42 @@
 RPCRTAPI RPC_STATUS RPC_ENTRY
   I_RpcAsyncSendReceive( RPC_MESSAGE* Message, void* Context, HWND hWnd );
 
-RPCRTAPI RPC_STATUS RPC_ENTRY
-  I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn );
+typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, HANDLE hSyncEvent);
 
-/* WIN9x */
 RPCRTAPI RPC_STATUS RPC_ENTRY
-  I_RpcSetThreadParams( int fClientFree, void* Context, void* hWndClient );
+  I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn );
 
 RPCRTAPI UINT RPC_ENTRY
   I_RpcWindowProc( void* hWnd, UINT Message, UINT wParam, ULONG lParam );
 
-/* WINNT */
 RPCRTAPI RPC_STATUS RPC_ENTRY
   I_RpcSetWMsgEndpoint( WCHAR* Endpoint );
 
 RPCRTAPI RPC_STATUS RPC_ENTRY
   I_RpcBindingInqTransportType( RPC_BINDING_HANDLE Binding, unsigned int* Type );
+
+#endif
+
+#else
+
+/* WIN9x */
+RPCRTAPI RPC_STATUS RPC_ENTRY
+  I_RpcServerStartListening( void* hWnd );
+
+RPCRTAPI RPC_STATUS RPC_ENTRY
+  I_RpcServerStopListening( void );
+
+typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, void* hSyncEvent);
+
+RPCRTAPI RPC_STATUS RPC_ENTRY
+  I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn, unsigned long ServerTid );
+
+RPCRTAPI RPC_STATUS RPC_ENTRY
+  I_RpcSetThreadParams( int fClientFree, void* Context, void* hWndClient );
+
+RPCRTAPI UINT RPC_ENTRY
+  I_RpcWindowProc( void* hWnd, unsigned int Message, unsigned int wParam, unsigned long lParam );
+
+#endif
 
 #endif /*__WINE_RPCDCEP_H */
Index: dlls/rpcrt4/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/Makefile.in,v
retrieving revision 1.25
diff -u -r1.25 Makefile.in
--- dlls/rpcrt4/Makefile.in	28 Apr 2004 01:04:49 -0000	1.25
+++ dlls/rpcrt4/Makefile.in	2 Sep 2004 16:14:33 -0000
@@ -1,4 +1,4 @@
-EXTRADEFS = -D_RPCRT4_ -DCOM_NO_WINDOWS_H
+EXTRADEFS = -D_RPCRT4_ -DCOM_NO_WINDOWS_H -DMSWMSG
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
Index: dlls/rpcrt4/rpc_binding.c
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/rpc_binding.c,v
retrieving revision 1.28
diff -u -r1.28 rpc_binding.c
--- dlls/rpcrt4/rpc_binding.c	23 Jun 2004 00:10:29 -0000	1.28
+++ dlls/rpcrt4/rpc_binding.c	2 Sep 2004 16:14:33 -0000
@@ -1024,7 +1024,7 @@
 /***********************************************************************
  *             RpcBindingToStringBindingW (RPCRT4.@)
  */
-RPC_STATUS WINAPI RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding, LPWSTR* StringBinding )
+RPC_STATUS WINAPI RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding, unsigned short** StringBinding )
 {
   RPC_STATUS ret;
   unsigned char *str = NULL;
Index: dlls/rpcrt4/rpc_server.c
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/rpc_server.c,v
retrieving revision 1.30
diff -u -r1.30 rpc_server.c
--- dlls/rpcrt4/rpc_server.c	17 Jun 2004 19:54:34 -0000	1.30
+++ dlls/rpcrt4/rpc_server.c	2 Sep 2004 16:14:34 -0000
@@ -992,7 +992,7 @@
 /***********************************************************************
  *             I_RpcServerStartListening (RPCRT4.@)
  */
-RPC_STATUS WINAPI I_RpcServerStartListening( void* hWnd )
+RPC_STATUS WINAPI I_RpcServerStartListening( HWND hWnd )
 {
   FIXME( "(%p): stub\n", hWnd );
 


More information about the wine-patches mailing list