Cisco Cisco Computer Telephony Integration OS 8.5 Entwickleranleitung
Chapter 3 CIL Coding Conventions
Generic Interfaces
3-10
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
// COM Example in C++
int errorCode = 0;
HRESULT hr = pCall->Answer(&errorCode);
if (errorCode=CIL_FAILED)
printf(“An error has occurred while answering the call.”)
In Visual Basic, HRESULT values are hidden under the covers. When an error
occurs, a Visual Basic exception is thrown, which can be caught using the On
Error: construct. The CIL error code is returned as the result of the method call:
occurs, a Visual Basic exception is thrown, which can be caught using the On
Error: construct. The CIL error code is returned as the result of the method call:
‘ VB example:
On Error GoTo Error_handler
Dim errorCode as Long
ErrorCode = pCall.Answer
If ErrorCode = CIL_FAILED
Debug.print “An error has occurred.”
The complete set of HRESULT values is defined by Microsoft in the header file
winerror.h. The most common HRESULT values that might be seen by CTI OS
developers are listed in
winerror.h. The most common HRESULT values that might be seen by CTI OS
developers are listed in
Generic Interfaces
One of the main design goals of CTI OS was to enable future enhancements to the
CTI OS feature set without breaking existing interfaces. To accomplish this, a
parameter for almost every method and event will be an Arguments array
containing the actual parameters needed. Therefore, parameters may be added or
CTI OS feature set without breaking existing interfaces. To accomplish this, a
parameter for almost every method and event will be an Arguments array
containing the actual parameters needed. Therefore, parameters may be added or
Table 3-5
COM Error Codes
COM Error Code
Numeric
Value
Value
Description
S_OK
0x00000000
The method succeeded.
S_FALSE
0x00000001
The method succeeded, but something
unusual happened.
unusual happened.
E_FAILED
0x80000008
The method failed.
REG_DB_E_
CLASSNOTREG
CLASSNOTREG
0x80040143
The class was not found in the registry.
You will need to run regsvr32.exe on the
DLL file to register it.
You will need to run regsvr32.exe on the
DLL file to register it.