Important: The information in this document is obsolete and should not be used for new development.
PurgeCollection
You use thePurgeCollectionfunction to remove all items in a collection whose attributes match a specified pattern.
void PurgeCollection(Collection target, long whichAttributes, long matchingAttributes);
target- A reference to the collection object containing the items you want to remove.
whichAttributes- A mask indicating which attributes you want to test.
matchingAttributes- A long word containing the values of the attributes you want to match.
DESCRIPTION
ThePurgeCollectionfunction removes from the target collection any items whose attributes match the criteria you specify in thewhichAttributesandmatchingAttributesparameters.The
whichAttributesparameter allows you to specify which attributes this function examines. You should set the bits of thewhichAttributesparameter that correspond to the attributes you want to test.This function compares the specified attributes of each item in the target collection with the corresponding attributes in the
matchingAttributesparameter. If the values of all the specified attributes match, the function removes the item. To avoid purging locked items, you should clear the lock attribute in thewhichAttributesandmatchingAttributesparameters.SEE ALSO
For information about collection items, see "Collection Items" beginning on page 5-8.For examples using this function, see "Removing Items From a Collection" beginning on page 5-30.
To remove all of the items in a collection with a specified collection tag, use the
PurgeCollectionTagfunction, described in the next section.To remove every item in a collection, use the
EmptyCollectionfunction, described on page 5-68.