Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide
4-17
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
Chapter 4 Building Your Application
Using the COM CIL in C++
•
Microsoft’s ActiveX Template Library (ATL). To use ATL, include the
standard COM header file: atlbase.h.
Important Note About COM Method Syntax
In this manual, the syntax used to describe method calls in COM shows standard
COM data types such as BSTR, VARIANT and SAFEARRAY. Be aware that
depending on the development environment, tools, and the manner how the COM
CIL is included in your project application, these data types can be encapsulated
by wrapper classes proper to the environment.
COM data types such as BSTR, VARIANT and SAFEARRAY. Be aware that
depending on the development environment, tools, and the manner how the COM
CIL is included in your project application, these data types can be encapsulated
by wrapper classes proper to the environment.
For example, in a Microsoft Visual C++ project a VARIANT type can be either a
CComVariant or _variant_t, and a BSTR type can be either a CComBSTR or
_bstr_t.
CComVariant or _variant_t, and a BSTR type can be either a CComBSTR or
_bstr_t.
For more information, see the documentation for your development environment.
Note
The sample application for COM C++ is built using the MFC class support. Either
MFC or COM is acceptable for using the CIL for COM in a C++ application.
MFC or COM is acceptable for using the CIL for COM in a C++ application.
Using the CIL Dynamic Link Libraries
Next, you must import the COM Dynamic Link Libraries into your C++
application. The following code sample (which you might put into your StdAfx.h
file) depicts how to use a COM Dynamic Link Library in C++:
application. The following code sample (which you might put into your StdAfx.h
file) depicts how to use a COM Dynamic Link Library in C++:
#import "..\..\Distribution\COM\ctiossessionresolver.dll" using namespace CTIOSSESSIONRESOLVERLib;
#import "..\..\Distribution\COM\ctiosclient.dll" using namespace CTIOSCLIENTLib;
Note
You must register three DLLs, but you do not need to import the arguments.dll
into your project since it is imported by the ctiosclient.dll type library.
into your project since it is imported by the ctiosclient.dll type library.