Sun Java System Access Manager 7.1 C API Reference

am_properties_copy()

Duplicates a specified properties object.

Details

am_properties_copy() copies all the elements in the specified properties object, creates a duplicate instance, and assigns a pointer to it. The original object is not affected during the operation. The removal of any item in either structures does not affect the other.

Syntax

#include "am_properties.h"
AM_EXPORT am_status_t
am_properties_copy(am_properties_t source_properties,
                   am_properties_t *properties_ptr);

Parameters

This function takes the following parameters:

source_properties

The specified properties object.

properties_ptr

Pointer to the location of the copy of the specified properties object.

Returns

This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):

AM_SUCCESS

If the specified properties object was successfully copied.

AM_NO_MEMORY

If unable to allocate memory for the new properties object.

AM_INVALID_ARGUMENT

If the source_properties or properties_ptr argument is NULL.

Memory Concerns

After using the properties_ptr, call am_properties_destroy() to clean up the allocated memory.