RPC Merge (A_PL3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the real rpc_binding.h instead of my hack version.

Relative to A_PL2.

From Jürgen Schmied's RPC patches.
Minor changes may exist between this and the original 
patch but it's intended to be basically the same stuff.

LICENSE: X11

CHANGELOG:

* dlls/rpcrt4: rpc_binding.c,  rpc_binding.h
  Ove Kaaven <ovek@transgaming.com>
- Use the real rpc_binding.h and remove hacks
  used to compile without it.

-- 
gmt

"If ye love wealth better than liberty, the tranquility
of servitude better than the animating contest of freedom,
go home from us in peace. We ask not your counsels or your
arms. Crouch down and lick the hands, which feed you. May
your chains set lightly upon you, and may posterity forget
that ye were our countrymen." 

-Samuel Adams
--- dlls/rpcrt4/rpc_binding.h.A_PL2	2002-10-04 09:19:37.000000000 -0500
+++ dlls/rpcrt4/rpc_binding.h	2002-10-04 11:17:12.000000000 -0500
@@ -1,39 +1,42 @@
-/*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * 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
- */
-
-/*
- * Warning: this is not the real header file, just
- * a placeholder until the real deal is available.
- * I have no idea if this stuff is correct -gmt
- */
-
-typedef struct {
-  long refs;
-  BOOL server;
-  LPSTR Protseq;
-  LPSTR NetworkAddr;
-  LPSTR Endpoint;
-  INT conn;
-  OVERLAPPED ovl;
-  RPC_BLOCKING_FN BlockingFn;
-  unsigned long ServerTid;
-  UUID ObjectUuid;
-} RpcBinding;
-
-/* Shared internal functions */
-LPWSTR RPCRT4_strdupWA(LPSTR src, INT slen);
-RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding);
-RPC_STATUS RPCRT4_CloseBinding(RpcBinding* Binding);
+#ifndef __WINE_RPC_BINDING_H
+#define __WINE_RPC_BINDING_H
+
+/* don't know what MS's structure looks like */
+typedef struct _RpcBinding
+{
+  DWORD refs;
+  struct _RpcBinding* Next; /* for rpc server */
+  BOOL server;
+  UUID ObjectUuid;
+  LPSTR Protseq;
+  LPSTR NetworkAddr;
+  LPSTR Endpoint;
+  RPC_BLOCKING_FN BlockingFn;
+  ULONG ServerTid;
+  HANDLE conn, thread;
+  OVERLAPPED ovl;
+} RpcBinding;
+
+LPSTR RPCRT4_strdupAA(LPSTR src, INT len);
+LPSTR RPCRT4_strdupAW(LPWSTR src, INT len);
+LPWSTR RPCRT4_strdupWA(LPSTR src, INT len);
+LPWSTR RPCRT4_strdupWW(LPWSTR src, INT len);
+void RPCRT4_strfree(LPSTR src);
+
+#define RPCRT4_strdup(x) RPCRT4_strdupAA(x,-1)
+#define RPCRT4_strdupA(x) RPCRT4_strdupAA(x,-1)
+#define RPCRT4_strdupW(x) RPCRT4_strdupAW(x,-1)
+
+RPC_STATUS RPCRT4_CreateBindingA(RpcBinding** Binding, BOOL server, LPSTR Protseq);
+RPC_STATUS RPCRT4_CreateBindingW(RpcBinding** Binding, BOOL server, LPWSTR Protseq);
+RPC_STATUS RPCRT4_CompleteBindingA(RpcBinding* Binding, LPSTR NetworkAddr,  LPSTR Endpoint,  LPSTR NetworkOptions);
+RPC_STATUS RPCRT4_CompleteBindingW(RpcBinding* Binding, LPWSTR NetworkAddr, LPWSTR Endpoint, LPWSTR NetworkOptions);
+RPC_STATUS RPCRT4_ResolveBinding(RpcBinding* Binding, LPSTR Endpoint);
+RPC_STATUS RPCRT4_SetBindingObject(RpcBinding* Binding, UUID* ObjectUuid);
+RPC_STATUS RPCRT4_SpawnBinding(RpcBinding** Binding, RpcBinding* OldBinding);
+RPC_STATUS RPCRT4_ExportBinding(RpcBinding** Binding, RpcBinding* OldBinding);
+RPC_STATUS RPCRT4_DestroyBinding(RpcBinding* Binding);
+RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding);
+RPC_STATUS RPCRT4_CloseBinding(RpcBinding* Binding);
+
+#endif
--- dlls/rpcrt4/rpc_binding.c.A_PL2	2002-10-04 09:19:25.000000000 -0500
+++ dlls/rpcrt4/rpc_binding.c	2002-10-04 11:23:28.000000000 -0500
@@ -89,7 +89,7 @@
   NewBinding = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcBinding));
   NewBinding->refs = 1;
   NewBinding->server = server;
-  NewBinding->Protseq = RPCRT4_strdupAA(Protseq, strlen(Protseq)); /* FIXME: RPCRT4_strdupA */
+  NewBinding->Protseq = RPCRT4_strdupA(Protseq);
 
   TRACE("binding: %p\n", NewBinding);
   *Binding = NewBinding;
@@ -104,7 +104,7 @@
   NewBinding = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcBinding));
   NewBinding->refs = 1;
   NewBinding->server = server;
-  NewBinding->Protseq = RPCRT4_strdupAW(Protseq, strlenW(Protseq)); /* FIXME: RPCRT4_strdupW */
+  NewBinding->Protseq = RPCRT4_strdupW(Protseq);
 
   TRACE("binding: %p\n", NewBinding);
   *Binding = NewBinding;
@@ -115,9 +115,9 @@
 RPC_STATUS RPCRT4_CompleteBindingA(RpcBinding* Binding, LPSTR NetworkAddr,  LPSTR Endpoint,  LPSTR NetworkOptions)
 {
   RPCRT4_strfree(Binding->NetworkAddr);
-  Binding->NetworkAddr = RPCRT4_strdupAA(NetworkAddr, strlen(NetworkAddr)); /* FIXME: RPCRT4_strdupA */
+  Binding->NetworkAddr = RPCRT4_strdupA(NetworkAddr);
   RPCRT4_strfree(Binding->Endpoint);
-  Binding->Endpoint = RPCRT4_strdupAA(Endpoint, strlen(Endpoint)); /* FIXME: RPCRT4_strdupA */
+  Binding->Endpoint = RPCRT4_strdupA(Endpoint);
 
   return RPC_S_OK;
 }
@@ -125,9 +125,9 @@
 RPC_STATUS RPCRT4_CompleteBindingW(RpcBinding* Binding, LPWSTR NetworkAddr, LPWSTR Endpoint, LPWSTR NetworkOptions)
 {
   RPCRT4_strfree(Binding->NetworkAddr);
-  Binding->NetworkAddr = RPCRT4_strdupAW(NetworkAddr, strlenW(NetworkAddr)); /* FIXME: RPCRT4_strdupW */
+  Binding->NetworkAddr = RPCRT4_strdupW(NetworkAddr);
   RPCRT4_strfree(Binding->Endpoint);
-  Binding->Endpoint = RPCRT4_strdupAW(Endpoint, strlenW(Endpoint)); /* FIXME: RPCRT4_strdupW */
+  Binding->Endpoint = RPCRT4_strdupW(Endpoint);
 
   return RPC_S_OK;
 }
@@ -135,7 +135,7 @@
 RPC_STATUS RPCRT4_ResolveBinding(RpcBinding* Binding, LPSTR Endpoint)
 {
   RPCRT4_strfree(Binding->Endpoint);
-  Binding->Endpoint = RPCRT4_strdupAA(Endpoint, strlen(Endpoint)); /* FIXME: RPCRT4_strdup */
+  Binding->Endpoint = RPCRT4_strdup(Endpoint);
 
   return RPC_S_OK;
 }
@@ -154,9 +154,9 @@
   NewBinding = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcBinding));
   NewBinding->refs = 1;
   NewBinding->server = OldBinding->server;
-  NewBinding->Protseq = RPCRT4_strdupAA(OldBinding->Protseq, strlen(OldBinding->Protseq)); /* FIXME: RPCRT4_strdup */
-  NewBinding->NetworkAddr = RPCRT4_strdupAA(OldBinding->NetworkAddr, strlen(OldBinding->NetworkAddr)); /* FIXME: RPCRT4_strdup */
-  NewBinding->Endpoint = RPCRT4_strdupAA(OldBinding->Endpoint, strlen(OldBinding->Endpoint)); /* FIXME: RPCRT4_strdup */
+  NewBinding->Protseq = RPCRT4_strdup(OldBinding->Protseq);
+  NewBinding->NetworkAddr = RPCRT4_strdup(OldBinding->NetworkAddr);
+  NewBinding->Endpoint = RPCRT4_strdup(OldBinding->Endpoint);
   /* because of the way named pipes work, we'll transfer the connected pipe
    * to the child, then reopen the server binding to continue listening */
   NewBinding->conn = OldBinding->conn;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux