Duplicates the data in an SE_FIELDS structure by allocating memory for any internal pointers, then populating it with data from the input SE_FIELDS 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_FreeFields() to free the internal pointers allocated within
fields_out_ptr.
SE_DRM_NULL_REQUIRED_PARAMETER - and *fields_out_ptr is left unaltered, if fields_out_ptr or fields_in_ptr was NULL.
SE_DRM_FAILURE - and *fields_out_ptr's tag is set to SE_NULL_TOKEN, if the API could not allocate the memory for the dynamically allocated memory it should refer to.
| extern SE_DRM_STATUS_CODE_ENUM | |||
| SE_CloneFields | |||
| ( | |||
| SE_FIELDS_PTR | fields_in_ptr, | (notes) | |
| SE_FIELDS | * | fields_out_ptr | (notes) |
| ); | |||
the fields that are to be duplicated.
a pointer to an SE_FIELDS 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.