我需要在为 Siebel CTI 创建自定义驱动程序时注册自定义错误代码。根据其文档,预定义了以下错误(来自scapi.h
的枚举):
enum SCErrorCode
{
SC_EC_OK = 0,
SC_EC_ERROR = 1,
SC_EC_CMD_NOT_SUPPORTED = 2,
SC_EC_MEDIA_TYPE_NOT_SUPPORTED = 3,
SC_EC_INVALID_HANDLE = 4,
SC_EC_OUT_OF_MEMORY = 5,
SC_EC_NETWORK_ERROR = 6,
SC_EC_LIB_LOAD_ERR = 7, /* Unable to load driver DLL */
SC_EC_FUNC_NOT_RESOLVED = 8, /* Unable to resolve function address */
SC_EC_DRIVER_CREATION_ERR = 9,
SC_EC_DRIVER_RELEASE_ERR = 10,
SC_EC_SERVICE_CREATION_ERR = 11,
SC_EC_SERVICE_RELEASE_ERR = 12,
SC_EC_INVALID_ITEM_TRACKING_ID = 13,
SC_EC_CLIENT_INTERFACE_ERR = 14, /* Failed on invoking ISC_CLIENT_HANDLE function */
SC_EC_SENDMSG_FAILED_RETRY = 15, /* SC_CT_SENDMESSAGE failed, please resend again later */
SC_EC_IMPOBJ_CREATE_ERR = 16, /* Unable to create the underlying implementation object */
SC_EC_INVALID_LICENSE = 17,
SC_EC_WORK_ITEM_WRONG_STATE = 18, /* Work item is at wrong state for the operation */
SC_EC_DRIVER_SPECIFIC = 1000
};
Siebel管理指南page 270说:
SCErrorCode: SCErrorCode枚举的值指定预定义的错误代码。保留0到1000的错误代码。
如何添加/注册自定义错误代码?或者有没有办法使用SC_EC_DRIVER_SPECIFIC
错误指定驱动程序特定的错误消息。