Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 490
   
4-11
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 4      Building Your Application
Using the COM CIL in Visual C++ 8.0(1)
    ' instantiate the sessionresolver
    Set m_sessionresolver = New Cisco.CTIOSSESSIONRESOLVERLib.SessionResolver
    
    ' CTI OS ActiveX controls use the session named "" - blank
    ' since the CTI OS ActiveX controls do the connection and login,
    ' all we do is listen for events
    Set m_session = m_sessionresolver.GetSession("")
End Sub
Private Sub Form_Terminate_Renamed()
    Call m_sessionresolver.RemoveSession("")
End Sub
Private Sub m_Session_OnCallEstablished(ByVal pIArguments As 
Cisco.CTIOSCLIENTLib.Arguments) 
' Handles m_Session.OnCallEstablished
    GetCallVariable1 pIArguments
End Sub
Function GetCallVariable1(ByVal pIArguments As CTIOSCLIENTLib.IArguments)
   
    Dim m_uid As String
    m_uid = pIArguments.GetValueString("Uniqueobjectid")
Dim m_call As Cisco.CTIOSCLIENTLib.Call
    Set m_call = m_session.GetObjectFromObjectID(m_uid)
   
    ' retrieve callvar1
    Dim m_callvar1 As String
    m_callvar1 = m_call.GetValueString("Callvariable1")
    
    'copy call variable1 to the clipboard
    Clipboard.SetText m_callvar1
End Function
Note
Visual Basic 6.0 is no longer supported.
Using the COM CIL in Visual C++ 8.0(1)
COM Client Interface Library (COM CIL.) 
You use this API in development environments that support COM/DCOM and OLE Automation. 
Examples: Microsoft Visual Basic 6.0, Microsoft Visual C++ 6.0, 7.0 and 8.0, Borland Delphi, Power 
Builder, etc. COM CIL is an adaptor interface that uses C++ CIL as kernel. The API is deployed as a 
group of Dynamic Linked Libraries (DLLs) 
Note
You must use Visual Studio .NET to build all C++ applications using COM CIL. Applications using 
COM CIL built with Visual C++ 6.0 are not supported.