Author: tretiakov
Date: Fri Mar 24 17:14:34 2006
New Revision: 21374
URL:
http://svn.reactos.ru/svn/reactos?rev=21374&view=rev
Log:
Implement RpcBindingCopy()
Modified:
trunk/reactos/dll/win32/rpcrt4/rpc_binding.c
trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_binding.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_bindin…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpc_binding.c (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpc_binding.c Fri Mar 24 17:14:34 2006
@@ -592,6 +592,42 @@
return ndst;
}
+/***********************************************************************
+ * RpcBindingCopy (RPCRT4.@)
+ */
+RPC_STATUS RPC_ENTRY RpcBindingCopy(
+ RPC_BINDING_HANDLE SourceBinding,
+ RPC_BINDING_HANDLE* DestinationBinding)
+{
+ TRACE("RpcBindingCopy called\n");
+ RpcBinding *DestBinding = 0, *SrcBinding = (RpcBinding*)SourceBinding;
+
+ if(SrcBinding->server)
+ {
+ *DestinationBinding = NULL;
+ return RPC_S_WRONG_KIND_OF_BINDING;
+ }
+
+ DestBinding = (RpcBinding*)
+ HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcBinding));
+
+ if(!DestBinding)
+ {
+ *DestinationBinding = NULL;
+ return ERROR_NOT_ENOUGH_MEMORY;
+ }
+
+ memcpy(DestBinding, SrcBinding, sizeof(RpcBinding));
+ DestBinding->refs = 1;
+ DestBinding->Next = NULL;
+ DestBinding->server = FALSE;
+ DestBinding->Protseq = RPCRT4_strndupA(SrcBinding->Protseq, -1);
+ DestBinding->NetworkAddr = RPCRT4_strndupA(SrcBinding->NetworkAddr, -1);
+ DestBinding->Endpoint = RPCRT4_strndupA(SrcBinding->Endpoint, -1);
+
+ *DestinationBinding = DestBinding;
+ return RPC_S_OK;
+}
/***********************************************************************
* RpcStringBindingComposeA (RPCRT4.@)
Modified: trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpcrt4.spe…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec Fri Mar 24 17:14:34 2006
@@ -369,7 +369,7 @@
@ stub RpcAsyncGetCallStatus
@ stub RpcAsyncInitializeHandle
@ stub RpcAsyncRegisterInfo
-@ stub RpcBindingCopy
+@ stdcall RpcBindingCopy(ptr ptr)
@ stdcall RpcBindingFree(ptr)
@ stdcall RpcBindingFromStringBindingA(str ptr)
@ stdcall RpcBindingFromStringBindingW(wstr ptr)