Duplicates the data in an SE_PROPERTY_DATA_VALUE structure by allocating memory for its internal pointers (if any are in use), then populating it with data from the input SE_PROPERTY_DATA_VALUE structure. This function avoids the problem associated with doing a member-wise copy of the structure as documented in the comments for the SE_GetFields() function.
IMPORTANT NOTE: The caller is responsible for calling
SE_FreePropertyDataValue()
to free any internal pointers allocated within dest_ptr.
SE_DRM_NULL_REQUIRED_PARAMETER - and *dest_ptr is left unaltered, if dest_ptr or src_ptr was NULL.
SE_DRM_FAILURE - and dest_ptr->u.string_length is set to zero and dest_ptr->u.string_value is set to NULL, if the API could not allocate the memory for the dynamically allocated memory it should refer to.
| extern SE_DRM_STATUS_CODE_ENUM | ||||
| SE_ClonePropertyDataValue | ||||
| ( | ||||
| const | SE_PROPERTY_DATA_VALUE | * | src_ptr, | (notes) |
| SE_PROPERTY_DATA_VALUE | * | dest_ptr | (notes) | |
| ); | ||||
the SE_PROPERTY_DATA_VALUE that is to be duplicated.
a pointer to an SE_PROPERTY_DATA_VALUE structure within memory
managed by the caller. Non-dynamically allocated fields in this
structure will be directly populated with data from the input fields.
Dynamically allocated data will be allocated by this function, then
copied from the input structure.