Duplicates a specified properties object.
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.
#include "am_properties.h" AM_EXPORT am_status_t am_properties_copy(am_properties_t source_properties, am_properties_t *properties_ptr);
This function takes the following parameters:
The specified properties object.
Pointer to the location of the copy of the specified properties object.
This function returns one of the following values of the am_status_t enumeration (defined in the <am_types.h> header file):
If the specified properties object was successfully copied.
If unable to allocate memory for the new properties object.
If the source_properties or properties_ptr argument is NULL.
After using the properties_ptr, call am_properties_destroy() to clean up the allocated memory.