Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 500
   
12-19
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions
Cisco CTI OS Release 7.2(1)
Chapter 12      Helper Classes
Arguments Class
Remarks
Visual Basic's Integer type is a 16-bit integer. However, the GetValueInt method returns a 32-bit integer. 
Thus, in Visual Basic the return type for GetValueInt is actually a Visual Basic type Long. Visual Basic 
Programmers can use the GetValueInt method and receive the return value as an Integer, and Visual Basic 
will perform an implicit cast. However, if the value retrieved is a 32-bit integer, an overflow error will 
occur. To resolve this error, it is recommended that you use a 32-bit integer (Long).
Those methods that do not return a bool indicating success or failure will throw a CtiosException if the 
method fails. The most common reasons for failure are NULL key or element with specified key not 
found.
IsValid
The IsValid method returns True if the specified key exists in the current Arguments array, otherwise it 
returns False.
Syntax
C++: 
bool IsValid( std::string& key );
bool IsValid( char * key );
bool IsValid( Arg& arg );
bool IsValid( enum_Keywords key );
COM:
HRESULT IsValid( /*[in]*/ VARIANT* key, /*[out, retval]*/
VARIANT_BOOL* bIsvalid);
VB: 
IsValid (key as string) as Boolean
Java, .NET:
boolean IsValid(int key)
boolean IsValid(String key)
boolean   IsValid(Arg rArg)
Parameters
key/arg
Either the key of the desired Arguments member or an Arg containing a string key.
C++ and COM allow you to specify the key as string or enumerated (see 
); all others expect the key as a string.
Return Values
COM: Default HRESULT return values. See 
Others: True if key exists in the current Arguments array, otherwise False.
NumElements
The NumElements method returns number of elements stored in the current arguments array. This 
method is useful in combination with GetElement to implement a “for” loop to iterate over all values of 
an arguments array without knowing the keywords (those can be retrieved at the same time using 
GetElementKey).