2 termination 2.1.3 error, Handling, Variants and csl cvalues – Teledyne LeCroy Automation API for Bluetooth Exercisers User Manual
Page 6

CATC
Automation API for CATC Bluetooth Exercisers
Manual Version 1.01
3
2.1.2 Termination
When the application is started in automation mode, the last client to disconnect will
automatically cause the application to terminate. In the case that the application was
started by the user on the server-side in GUI mode, a client is connected (even though it
cannot retrieve tool interfaces), and the user attempts to close the application, a dialog
will be presented indicating that a client is running and should be shut down.
If necessary, you can also shutdown the application by right-clicking on the icon in the
taskbar and selecting Shutdown server.
2.1.3 Error Handling
The BTExerciser class supports the ISupportErrorInfo interface. Text messages
describing all errors will be passed to clients. BTExerciser and ScriptManager specific
return codes (the lower 16 bits of the HRESULT) are defined as follows:
ERROR
BTEXERCISER_ERROR_BUSY
BTEXERCISER_ERROR_NOT_LICENSED
BTEXERCISER_ERROR_TOOL_OPEN
BTEXERCISER_ERROR_PIPE_EXISTS
BTEXERCISER_ERROR_FILE
BTEXERCISER_ERROR_PIPE_NOT_FOUND
SCRIPTMANAGER_ERROR_SCRIPT_COMPILER
SCRIPTMANAGER_ERROR_FILE
SCRIPTMANAGER_ERROR_NO_SCRIPT
SCRIPTMANAGER_ERROR_SCRIPT_RUNNING
VALUE
0x1001
0x1002
0x1003
0x1004
0x1005
0x1006
0x900
0x901
0x902
0x903
Whenever possible standard COM error codes are generated. For example: invalid
parameters passed to a member function will generate the E_INVALIDARG HRESULT
return code, failed memory allocations will generate E_OUTOFMEMORY, and un-
implemented functions will return E_NOTIMPL.
2.1.4 VARIANTs and CSL CValues
VARIANTs are used to pass values between client application and CSL scripts.
Supported types of VARIANTs when converting to CValues are:
VT_UI1: Converted to an integer CValue.
VT_I2: Converted to an integer CValue.
VT_I4: Converted to an integer CValue.