int Ini_CopySection (IniText source, const char sectionToCopy[], IniText destination, int overwriteDuplicateSections);
This function copies a section of tag-value pairs from one in-memory list to another.
If there already is a section of the same name in the Destination list, you have the option of overwriting the section or merging the two sections. If you merge the two sections, items with the same tags are overwritten unless you have disabled duplicate checking using the Ini_SetDuplicateChecking function.
Input | ||
Name | Type | Description |
source | IniText | A handle returned from Ini_New. It represents the list of in-memory tag/value pairs. This list will be copied into the list specified by the destination parameter. |
sectionToCopy | const char [] | This parameter specifies the name of the section in the Source list to merge into the Destination List. Pass 0 to merge all of the sections in the Source list into the Destination list. |
destination | IniText | A handle returned from Ini_New. It represents the list of in-memory tag/value pairs. The contents of the Source list will be copied into this list. |
overwriteDuplicateSections | integer | This parameter specifies whether sections in the Source list completely overwrite previously existing sections with the same name in the Destination list. If there a section in the Destination list has the same name as a section being copied, you have the option of overwriting the section or merging the two sections. If you merge the two sections, items with the same tags are overwritten unless you have disabled duplicate checking using the Ini_SetDuplicateChecking function. Pass 1 (TRUE) to completely overwrite previously existing sections in the Destination. Pass 0 (FALSE) to merge the items in sections with same name into the Destination list. Items with the same tag names are overwritten unless you have disabled duplicate checking using the Ini_SetDuplicateChecking function. |
Name | Type | Description | ||
status | integer | Indicates whether the function was successful. A zero indicates success. A negative value indicates an error. If the value is from The only error you are likely to encounter is:
|