Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 500
   
4-11
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 4      Building Your Application
Using the COM CIL in Visual C++ 7.5(1)
Dim m_sessionresolver As Cisco.CTIOSSESSIONRESOLVERLib.SessionResolver
Private Sub Form_Initialize_Renamed()
    ' 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++ 7.5(1)
COM Client Interface Library (COM CIL.) 
This API is used in development environments that support COM/DCOM and OLE Automation. 
Examples are: Microsoft Visual Basic 6.0, Microsoft Visual C++ 6,0,70 & 8.0, Borland Delphi, Power 
Builder, etc. COM CIL is an adaptor interface that uses C++ CIL as kernel. The API is deployed as group 
of Dynamic Linked Libraries (DLLs) 
Note
All C++ applications using COM CIL 7.5(1) must be built using Visual Studio .NET. Applications 
using COM CIL 7.5(1) built with Visual C++ 6.0 are not supported.