Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 546
 
9-23
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
 
Chapter 9      Agent Object
Methods
             hr=SafeArrayGetElement(varSkills.parray,&nI,&pSkill);
             if(SUCCEDED(hr)){
                  int nSkillGrpNumber = 0;
                   VARIANT vPropKey;
                   VariantInit(&vPropKey);
                   vPropKey.vt = VT_BSTR;
                   vPropKey.bstr =  OLESTR(“SkillGroupNumber”);
                   pSkill->GetValueInt(vPropKey,&nSkillGrpNumber);
                  pSkill->Release();
                  VariantClear(&vPropKey);
             }
         }          
     }
}
VB
In VB the GetSkillGroups method returns a variant array where each element is a 
reference to a CTIOSClientLib.SkillGroup object.
To retrieve references to skill group objects you need to do something similar to 
what is shown in the following code example.
Dim  obSkill As CTIOSClientLib.SkillGroup
Dim arSkills As Variant
              Dim lNumElements as Long
              arSkills = m_Agent.GetSkillGroups()
              lNumElements = UBound(arSkills,1)
             For nI = 0 to lNumElements 
                  Set obSkill = arSkills(nI)
                  Print “SkillGroup” & 
obSkill.GetValueString(CStr(“UniqueObjectId”)) &  _
                            “Skill Group Number: “ &  
obSkill.GetValueInt(CStr(“SkillGroupNumber”))
            Next
            End For
GetValue Methods
See 
 for descriptions of the GetValue, GetValueInt, 
GetValueArray, and GetValueString methods.