Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 500
   
12-3
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 12      Helper Classes
Arg Class
Parameters
None.
Return Values
COM: Default HRESULT return values. See 
C++: The current reference count after the AddRef() call.
Clone
The Clone method allocates a new Arg in memory and copies its key, value, and type to the new instance. 
When using the C++ or COM CILs, it is important to release the object when it is no longer needed.
Syntax
C++: 
Arg & Clone()
COM:
HRESULT Clone(/*[out, retval]*/ IArg** arg);
VB: 
Clone() as CTIOSCLIENTLib.IArg
Java:
Arg Clone()
.NET:
Ojbect Clone()
Output Parameters
arg
Pointer to an IArg instance that is a copy of the object.
Return Values
COM: Default HRESULT return values. See 
Others: If successful, will return a reference to a new Arg object. If unsuccessful in C++ or VB, it will 
throw a CCtiosException with iCode set to E_CTIOS_ARGUMENT_ALLOCATION_FAILED. If 
unsuccessful in Java, it returns null but does not throw an exception.
CreateInstance
The CreateInstance method creates an object of type Arg class and sets the reference count of the object 
to 1. It is important to release the object when it is no longer in use in the program.
Syntax
C++:
static Arg& CreateInstance(); // static creation mechanism.
static Arg& CreateInstance(Arg& arg); // static creation mechanism.
static bool CreateInstance(Arg ** arg); // static creation mechanism,
// alternate version
COM: 
Wrapped by CoCreateInstance 
VB:
Wrapped by New 
Java, .NET:
 Not available