NT4/private/newsam2/server/samifree.c
2020-09-30 17:12:29 +02:00

406 lines
6.4 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (c) 1992 Microsoft Corporation
Module Name:
samifree.c
Abstract:
This file contains routines to free structure allocated by the Samr
routines. These routines are used by SAM clients which live in the
same process as the SAM server and call the Samr routines directly.
Author:
Cliff Van Dyke (CliffV) 26-Feb-1992
Environment:
User Mode - Win32
Revision History:
--*/
///////////////////////////////////////////////////////////////////////////////
// //
// Includes //
// //
///////////////////////////////////////////////////////////////////////////////
#include <samsrvp.h>
VOID
SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR (
PSAMPR_SR_SECURITY_DESCRIPTOR Source
)
/*++
Routine Description:
This routine free a SAMPR_SR_SECURITY_DESCRIPTOR and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgs__SAMPR_SR_SECURITY_DESCRIPTOR ( Source );
MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_DOMAIN_INFO_BUFFER (
PSAMPR_DOMAIN_INFO_BUFFER Source,
DOMAIN_INFORMATION_CLASS Branch
)
/*++
Routine Description:
This routine free a SAMPR_DOMAIN_INFO_BUFFER and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Branch - Specifies which branch of the union to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgu__SAMPR_DOMAIN_INFO_BUFFER ( Source, Branch );
MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_ENUMERATION_BUFFER (
PSAMPR_ENUMERATION_BUFFER Source
)
/*++
Routine Description:
This routine free a SAMPR_ENUMERATION_BUFFER and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgs__SAMPR_ENUMERATION_BUFFER ( Source );
MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_PSID_ARRAY (
PSAMPR_PSID_ARRAY Source
)
/*++
Routine Description:
This routine free a the graph of allocated nodes pointed to
by a PSAMPR_PSID_ARRAY
Parameters:
Source - A pointer to the node to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgs__SAMPR_PSID_ARRAY ( Source );
}
}
VOID
SamIFree_SAMPR_ULONG_ARRAY (
PSAMPR_ULONG_ARRAY Source
)
/*++
Routine Description:
This routine free a SAMPR_ULONG_ARRAY and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgs__SAMPR_ULONG_ARRAY ( Source );
// SAM never allocates this.
// MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_RETURNED_USTRING_ARRAY (
PSAMPR_RETURNED_USTRING_ARRAY Source
)
/*++
Routine Description:
This routine free a SAMPR_RETURNED_USTRING_ARRAY and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgs__SAMPR_RETURNED_USTRING_ARRAY ( Source );
// SAM never allocates this.
// MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_GROUP_INFO_BUFFER (
PSAMPR_GROUP_INFO_BUFFER Source,
GROUP_INFORMATION_CLASS Branch
)
/*++
Routine Description:
This routine free a SAMPR_GROUP_INFO_BUFFER and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Branch - Specifies which branch of the union to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgu__SAMPR_GROUP_INFO_BUFFER ( Source, Branch );
MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_ALIAS_INFO_BUFFER (
PSAMPR_ALIAS_INFO_BUFFER Source,
ALIAS_INFORMATION_CLASS Branch
)
/*++
Routine Description:
This routine free a SAMPR_ALIAS_INFO_BUFFER and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Branch - Specifies which branch of the union to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgu__SAMPR_ALIAS_INFO_BUFFER ( Source, Branch );
MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_GET_MEMBERS_BUFFER (
PSAMPR_GET_MEMBERS_BUFFER Source
)
/*++
Routine Description:
This routine free a SAMPR_GET_MEMBERS_BUFFER and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgs__SAMPR_GET_MEMBERS_BUFFER ( Source );
MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_USER_INFO_BUFFER (
PSAMPR_USER_INFO_BUFFER Source,
USER_INFORMATION_CLASS Branch
)
/*++
Routine Description:
This routine free a SAMPR_USER_INFO_BUFFER and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Branch - Specifies which branch of the union to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgu__SAMPR_USER_INFO_BUFFER ( Source, Branch );
MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_GET_GROUPS_BUFFER (
PSAMPR_GET_GROUPS_BUFFER Source
)
/*++
Routine Description:
This routine free a SAMPR_GET_GROUPS_BUFFER and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgs__SAMPR_GET_GROUPS_BUFFER ( Source );
MIDL_user_free (Source);
}
}
VOID
SamIFree_SAMPR_DISPLAY_INFO_BUFFER (
PSAMPR_DISPLAY_INFO_BUFFER Source,
DOMAIN_DISPLAY_INFORMATION Branch
)
/*++
Routine Description:
This routine free a SAMPR_DISPLAY_INFO_BUFFER and the graph of
allocated nodes it points to.
Parameters:
Source - A pointer to the node to free.
Branch - Specifies which branch of the union to free.
Return Values:
None.
--*/
{
if ( Source != NULL ) {
_fgu__SAMPR_DISPLAY_INFO_BUFFER ( Source, Branch );
// SAM never allocates this.
// MIDL_user_free (Source);
}
}