Cisco Cisco Computer Telephony Integration Option 8.5 개발자 가이드

다운로드
페이지 640
Chapter 8      Session Object
Methods
8-24
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.0(0)
The following sample VB.NET code illustrates how to take the array returned 
from GetAllCalls() and use it to access the corresponding calls in the CIL’s object 
cache. The example uses the .NET CIL.
Dim args As Arguments
args = m_session.GetAllCalls()
' Iterate through all of the CILRefArg objects
' in the Arguments array.
'
Dim i As Integer
For i = 1 To args.NumElements()
    Dim refArg As CilRefArg
    ' Retrieve the CILRefArg at each position in the
    ' array.
    '
    If (args.GetElement(i, refArg)) Then
        If ((refArg Is Nothing) = False) Then
            ' The value method will return a reference
            ' to the call object referenced by the
            ' CILRefArg.
            '
            Dim aCall As Cisco.CtiOs.Cil.Call
            refArg.GetValue(aCall)
            Console.Out.WriteLine("--")
            Dim str As String
            If (aCall Is Nothing) Then
                Console.Out.WriteLine("Nothing")
            Else
                Console.Out.WriteLine(aCall.DumpProperties())
            End If
            Console.Out.WriteLine("--")
        End If
    End If
Next