lIndex

Index value that indicates where to insert a TAG_ITEM data element in a sequence. This parameter is valid only if the data element being inserted has a tag of value TAG_ITEM. If the data element being inserted has any other tag value, this parameter is ignored. The index is zero based, so if you want to insert a TAG_ITEM data element as the first item in the sequence, set this to 0. The value ELEMENT_INDEX_MAX indicates to add the TAG_ITEM data element to the end of the sequence.

A sequence may consist of one or more items. This parameter lets you insert a TAG_ITEM data element as any item within the sequence, not just at the end. In addition, it lets you insert multiple TAG_ITEM data elements within a sequence.

If the CurrentElement property contains an item that is the parent of a sequence and bChild is true, the index will pertain to the children of that item. If the CurrentElement property contains an item that is a member of a sequence and bChild is false, the index pertains to the siblings of that item.