#ifndef _CITICS_KCBPCLI2_H
#define _CITICS_KCBPCLI2_H
#ifdef WIN32
#ifdef CITICS_KCBPCLI_EXPORTS
#define CITICS_KCBPCLI_API __declspec(dllexport)
#else
#define CITICS_KCBPCLI_API __declspec(dllimport)
#endif
#define KCBPCLISTDCALL __stdcall /* ensure stcall calling convention on NT */
#else
#define KCBPCLI_API
#define KCBPCLISTDCALL /* leave blank for other systems */
#endif
typedef void *KCBPCLIHANDLE;
#ifdef __cplusplus
extern "C"
{
#endif
/// 初始化程序模块,加载Dll后,调用任何函数之前,必须首先进行初始化
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_InitPrograms2(KCBPCLIHANDLE hHandle = NULL);
/// 初始化服务器连接句柄,
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_Init(KCBPCLIHANDLE *hHandle);
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_Exit(KCBPCLIHANDLE hHandle);
/// 建立、断开服务器连接
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_ConnectServer2(KCBPCLIHANDLE hHandle);
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_DisConnect2(KCBPCLIHANDLE hHandle);
/// 提交业务请求
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_CallProgramAndCommit2(KCBPCLIHANDLE hHandle, char *ProgramName, char* Param);
/// 获取下一行数据
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_SQLFetch(KCBPCLIHANDLE hHandle);
/// 根据字段名称,读取字段值
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_RsGetColByName(KCBPCLIHANDLE hHandle, char *KeyName, char *Vlu);
/// 读取错误代码和错误信息
CITICS_KCBPCLI_API int KCBPCLISTDCALL CITICS_KCBPCLI_GetErr(KCBPCLIHANDLE hHandle, int *pErrCode, char *ErrMsg);
#ifdef __cplusplus
}
#endif
#endif