Author: ekohl
Date: Sun Oct 7 17:38:16 2012
New Revision: 57516
URL:
http://svn.reactos.org/svn/reactos?rev=57516&view=rev
Log:
[SAMSRV]
Implement SamIFree_SAMPR_RETURNED_USTRING_ARRAY and SamIFree_SAMPR_ULONG_ARRAY.
These functions are used to free structures that were allocated by calls to
Samr-functions.
Modified:
trunk/reactos/dll/win32/samsrv/samsrv.c
trunk/reactos/dll/win32/samsrv/samsrv.spec
Modified: trunk/reactos/dll/win32/samsrv/samsrv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samsrv.c?…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/samsrv.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/samsrv.c [iso-8859-1] Sun Oct 7 17:38:16 2012
@@ -63,4 +63,39 @@
return STATUS_SUCCESS;
}
+
+VOID
+NTAPI
+SamIFree_SAMPR_RETURNED_USTRING_ARRAY(PSAMPR_RETURNED_USTRING_ARRAY Ptr)
+{
+ ULONG i;
+
+ if (Ptr != NULL)
+ {
+ if (Ptr->Element != NULL)
+ {
+ for (i = 0; i < Ptr->Count; i++)
+ {
+ if (Ptr->Element[i].Buffer != NULL)
+ MIDL_user_free(Ptr->Element[i].Buffer);
+ }
+
+ MIDL_user_free(Ptr->Element);
+ }
+ }
+}
+
+
+VOID
+NTAPI
+SamIFree_SAMPR_ULONG_ARRAY(PSAMPR_ULONG_ARRAY Ptr)
+{
+ if (Ptr != NULL)
+ {
+ if (Ptr->Element != NULL)
+ MIDL_user_free(Ptr->Element);
+ }
+
+}
+
/* EOF */
Modified: trunk/reactos/dll/win32/samsrv/samsrv.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samsrv.sp…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/samsrv.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/samsrv.spec [iso-8859-1] Sun Oct 7 17:38:16 2012
@@ -10,9 +10,9 @@
@ stub SamIFree_SAMPR_GET_MEMBERS_BUFFER
@ stub SamIFree_SAMPR_GROUP_INFO_BUFFER
@ stub SamIFree_SAMPR_PSID_ARRAY
-@ stub SamIFree_SAMPR_RETURNED_USTRING_ARRAY
+@ stdcall SamIFree_SAMPR_RETURNED_USTRING_ARRAY(ptr)
@ stub SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR
-@ stub SamIFree_SAMPR_ULONG_ARRAY
+@ stdcall SamIFree_SAMPR_ULONG_ARRAY(ptr)
@ stub SamIFree_SAMPR_USER_INFO_BUFFER
@ stub SamIGetPrivateData
@ stub SamIGetSerialNumberDomain