Damjan Jovanovic : rpcrt4: Implement RpcProtseqVectorFree.

Alexandre Julliard julliard at winehq.org
Mon Jun 20 14:24:08 CDT 2011


Module: wine
Branch: master
Commit: acc112bad7a88252283d176334ccd18f5e0c66f7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=acc112bad7a88252283d176334ccd18f5e0c66f7

Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date:   Sun Jun 19 18:06:08 2011 +0200

rpcrt4: Implement RpcProtseqVectorFree.

---

 dlls/rpcrt4/rpc_transport.c |   36 ++++++++++++++++++++++++++++++++++++
 dlls/rpcrt4/rpcrt4.spec     |    4 ++--
 include/rpcdce.h            |    6 ++++++
 3 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 07a1e04..0ba9720 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -3124,3 +3124,39 @@ RPC_STATUS WINAPI RpcNetworkIsProtseqValidA(RPC_CSTR protseq)
   }
   return RPC_S_OUT_OF_MEMORY;
 }
+
+/***********************************************************************
+ *             RpcProtseqVectorFreeA (RPCRT4.@)
+ */
+RPC_STATUS WINAPI RpcProtseqVectorFreeA(RPC_PROTSEQ_VECTORA **protseqs)
+{
+  TRACE("(%p)\n", protseqs);
+
+  if (*protseqs)
+  {
+    int i;
+    for (i = 0; i < (*protseqs)->Count; i++)
+      HeapFree(GetProcessHeap(), 0, (*protseqs)->Protseq[i]);
+    HeapFree(GetProcessHeap(), 0, *protseqs);
+    *protseqs = NULL;
+  }
+  return RPC_S_OK;
+}
+
+/***********************************************************************
+ *             RpcProtseqVectorFreeW (RPCRT4.@)
+ */
+RPC_STATUS WINAPI RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW **protseqs)
+{
+  TRACE("(%p)\n", protseqs);
+
+  if (*protseqs)
+  {
+    int i;
+    for (i = 0; i < (*protseqs)->Count; i++)
+      HeapFree(GetProcessHeap(), 0, (*protseqs)->Protseq[i]);
+    HeapFree(GetProcessHeap(), 0, *protseqs);
+    *protseqs = NULL;
+  }
+  return RPC_S_OK;
+}
diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec
index 598e60e..38d29e8 100644
--- a/dlls/rpcrt4/rpcrt4.spec
+++ b/dlls/rpcrt4/rpcrt4.spec
@@ -418,8 +418,8 @@
 @ stub RpcObjectInqType
 @ stub RpcObjectSetInqFn
 @ stdcall RpcObjectSetType(ptr ptr)
-@ stub RpcProtseqVectorFreeA
-@ stub RpcProtseqVectorFreeW
+@ stdcall RpcProtseqVectorFreeA(ptr)
+@ stdcall RpcProtseqVectorFreeW(ptr)
 @ stdcall RpcRaiseException(long)
 @ stub RpcRegisterAsyncInfo
 @ stdcall RpcRevertToSelf()
diff --git a/include/rpcdce.h b/include/rpcdce.h
index 6b3bd3a..76994df 100644
--- a/include/rpcdce.h
+++ b/include/rpcdce.h
@@ -562,6 +562,12 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
 #define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid)
 
 RPCRTAPI RPC_STATUS RPC_ENTRY
+  RpcProtseqVectorFreeA( RPC_PROTSEQ_VECTORA** protseqs );
+RPCRTAPI RPC_STATUS RPC_ENTRY
+  RpcProtseqVectorFreeW( RPC_PROTSEQ_VECTORW** protseqs );
+#define RpcProtseqVectorFree WINELIB_NAME_AW(RpcProtseqVectorFree)
+
+RPCRTAPI RPC_STATUS RPC_ENTRY
   RpcRevertToSelf( void );
 RPCRTAPI RPC_STATUS RPC_ENTRY
   RpcRevertToSelfEx( RPC_BINDING_HANDLE Binding );




More information about the wine-cvs mailing list