Thank you for your reply, yes it was an example VB code.
I'll try your code, but temporary I testes this solution and it sems to work:
int count;
VARIANT Myindex;
Root->Sessions->get_Count( &count);
for(int i=0 ; i<count ; i++)
{
Myindex.lVal = i; //session index
Myindex.vt =...