Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide
Chapter 9 Agent Object
Methods
9-24
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.0(0)
hr = m_Agent->GetSkillGroups(&varSkills);
if(SUCCEDED(hr)){
if(varSkills.vt == (VT_ARRAY | VT_DISPATCH) ){
long lNumElements = 0;
SafeArrayGetUBound(varSkills.parray,1,&lNumElements);
for(long nI = 0; nI < lNumElements; nI ++){
ISkillGroup * pSkill= NULL;
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.
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.
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