GetTagCount

CAS ActiveX Methods

The GetTagCount method counts the number of tags in a taglist matching a specified query.  This method will not descend into the sections of a taglist.  To count the tags in a section taglist, you must first open the section with OpenSection and then pass the section taglist to GetTagCount.

LONG GetTagCount(
  LONG TagList, // Taglist in which tags will be counted
  BSTR TagName // Tag to count
)


Parameters:
TagList Taglist to be queried.

TagName
Value Meaning
"" Count all tags
"<tag name>" Specific tag name to be counted

Return Values:
Tag count

Example:
function IsTagInList( TagList, TagName )
  {
    // One purpose for GetTagCount would be to test for the presence
    // of a tag in a taglist.  This simple function returns 0 if the
    // tag is not in the list, and a non-zero value if the tag is in
    // the list.

  return(CAS.GetTagCount(TagList,TagName));
  }

See Also:
CAS New, CAS GetTag, CAS GetSectionCount, CAS OpenSection, CAS Send