Duplicates the data in an SE_STRING structure by allocating memory for its internal pointers, then populating it with data from the input SE_STRING 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_FreeString() to free the 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->string_length is set to zero and dest_ptr->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_CloneString | ||||
| ( | ||||
| const | SE_STRING | * | src_ptr, | (notes) |
| SE_STRING | * | dest_ptr | (notes) | |
| ); | ||||
the string that is to be duplicated.
a pointer to an SE_STRING 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.