GetSectionCount

CAS ActiveX Methods

The GetSectionCount method counts the number of sections contained in the taglist that begin with a specified tag name.

LONG GetSectionCount(
  LONG TagList, // Taglist in which sections will be counted
  BSTR TagName // Tag name of sections to count
)


Parameters:
TagList TagList in which sections will be counted.

TagName Tag name of sections to count 

Return Values:
Section count.

Example:
function GetPortCount()
  {
  var Tl, Count;

  Tl = CAS.New();
  CAS.AddTag(Tl,"GET_PORTS_INFO","");
  CAS.AddTag(Tl,"REGISTERED_NAME",REGISTERED_NAME.value);
  CAS.AddTag(Tl,"REGISTERED_PASSWORD",REGISTERED_PASS.value);

    // Send on this already open session 
  Tl = CAS.Send(Instance,Tl);
          
  Count = CAS.GetSectionCount(Tl,"PORT_NAME",0);

  CAS.Delete(Tl);

  return(
Count);
  }

See Also:
CAS Open, CAS GetTagCount, CAS GetTag, CAS OpenSection