📄 myvc.h
字号:
/****************************************************************************
函数: int DiskSQLCommandFile(char * no, char * diskfile)
说明 :将信号灯文件写成磁盘文件
filename : 内存文件编号
diskfile : 信号灯位置(取值 1 .. 30)
s_number : 写入个数
****************************************************************************/
extern "C" _declspec ( dllexport ) int PASCAL DiskSQLCommandFile(char * no, char * diskfile);
////////////////////////////////////////////////////////////////
//
// 函数 GetFileString(char * file, char * s_section, char * s_item, char * def)
// 说明:从文件中读取指定项目的值
// filename: 指定文件名
// section : 项目段落
// item : 指定项目
// def : 项目为空时的返回值
// value : 返回值
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL GetFileString(char * file, char * section, char * item, char * def, char * outstr);
////////////////////////////////////////////////////////////////
//
// 函数 int PASCAL GetFieldPos(char * big_str, char * little_str, char * sep_char)
// 说明:从字符串中读取字段的序号
// big_str : 指定字符串
// little_str : 子串
// sep_char : 字段分隔符
//
// 返回 : 找到值则返回位置,没有则 0
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) int PASCAL GetFieldPos(char * big_str, char * little_str, char * sep_char);
////////////////////////////////////////////////////////////////
//
// 函数 int PASCAL GetFieldValue(char * big_str, char * column_p, char * sep_char)
// 说明:从字符串中读取字段的序号
// big_str : 指定字符串 "chenxu:26:boy:"
// column_pos : 字段位置
// sep_char : 字段分隔符
//
// 返回 : 找到值则返回位置,没有则 0
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL GetFieldValue(char * big_str, char * column_p, char * sep_char, char *outstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID GetFileRecord(char * file, char * rec_num, char * filed)
// 说明:从文件中读取指定项目的值
// file : 指定SQL command文件名
// row : 行
// column_name : 列名
// outstr : 返回值
//
// 返回 : 找到值则返回,没有则null
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL GetFileRecord(char * file, char * row, char * column_name, char * sep_char ,char *outstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_DoNothing(char * instr ,char *vocstr)
// 说明:不作任何处理的语音解析函数
// instr : 数字字符串
// vocstr : 语音字符串
//
//
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_DoNothing(char * instr,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Int(char * instr ,char *vocstr)
// 说明:将整数转换成语音字符串
// instr : 整数串
// vocstr : 语音字符串
// 说明:(1)本函数只解析小于千亿的数字。
// (2) 调用此函数时,vocstr必须有足够的长度 。
// (3)在PB中定义的String类型变量作为vocstr时,必须先给
// 变量初始化一个很长的空串,否则会发生内存溢出错误。
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Int(char * instr ,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Digit(char * instr ,char *vocstr)
// 说明:将纯数字字符串转换成语音字符串
// instr : 数字字符串
// vocstr : 语音字符串
// 说明:PB中定义的String类型变量作为vocstr时,必须先给
// 变量初始化一个很长的空串,否则会发生内存溢出错误。
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Digit(char * instr ,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Real(char * instr ,char *vocstr)
// 说明:将实数型字符串转换成语音字符串
// instr : 实数型字符串
// vocstr : 语音字符串
// 说明:PB中定义的String类型变量作为vocstr时,必须先给
// 变量初始化一个很长的空串,否则会发生内存溢出错误。
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Real(char * instr ,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Int20(char * instr ,char *vocstr)
// 说明:将0~12转化成月份读音
// instr : 数字字符串
// vocstr : 语音字符串
// 说明:如 "12",将不读成 [一]:[十]:[二],而读成[十]:[二].
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Int20(char * instr,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Date(char * instr ,char *vocstr)
// 说明:将日期型字符串转换成语音字符串
// instr : 日期型字符串 "yyyymmdd" "1999"
// vocstr : 语音字符串
// 说明:PB中定义的String类型变量作为vocstr时,必须先给
// 变量初始化一个很长的空串,否则会发生内存溢出错误。
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Date(char * instr,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_DateDuan(char * instr ,char *vocstr)
// 说明:将日期段型字符串转换成语音字符串
// instr : 日期型字符串 "yyyymmyyyymm" "199910200002"
// vocstr : 语音字符串
// 说明:PB中定义的String类型变量作为vocstr时,必须先给
// 变量初始化一个很长的空串,否则会发生内存溢出错误。
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_DateDuan(char * instr,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Time(char * instr ,char *vocstr)
// 说明:将时间型字符串转换成语音字符串
// instr : 时间型字符串 "173027" 17点30分27秒
// vocstr : 语音字符串
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Time(char * instr,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Second(char * instr ,char *vocstr)
// 说明:将秒型字符串转换成语音字符串
// instr : 秒型字符串
// vocstr : 语音字符串
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Second(char * instr,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Money_Yuan(char * instr ,char *vocstr)
// 说明:将货币(元)型字符串转换成语音字符串
// instr : 货币元型字符串 "256.34"= "二百五十六元三角五分"
// vocstr : 语音字符串
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Money_Yuan(char * instr,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 LPVOID PASCAL VocExp_Money_Fen(char * instr ,char *vocstr)
// 说明:将货币(分)型字符串转换成语音字符串
// instr : 货币分型字符串 "111"= "1元1角1分"
// vocstr : 语音字符串
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) LPVOID PASCAL VocExp_Money_Fen(char * instr,char *vocstr);
////////////////////////////////////////////////////////////////
//
// 函数 int VerifyMonth(char * smonth)
// 说明:验证查询月份是否有效
// month : 月份
// 返回 :1-有效 0-无效
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) int PASCAL VerifyMonth(char * smonth);
////////////////////////////////////////////////////////////////
//
// 函数 int verify_ani(char * ani)
// 说明:验证主叫号码是否有效 //ReadGCARefuseCall()
// ani : 主叫号码
// 返回 :1-有效 0-无效
////////////////////////////////////////////////////////////////
extern "C" _declspec ( dllexport ) int PASCAL VerifyAni(char * ani);
/************************************************************
* NAME: SysPrintf()
* DESCRIPTION: 向主控程序发送系统显示信息
* return : 发送成功 1, 失败0
************************************************************/
extern "C" _declspec ( dllexport ) int SysPrintf(char *szFormat, ...);
/************************************************************
* NAME: ChannelSeizedByThisApp(int chn, int appid)
* DESCRIPTION: 根据信号灯状态判断通道 chn 是否为本程序占用
* return : 占用 1, 否则 0
************************************************************/
extern "C" _declspec ( dllexport ) int PASCAL ChannelSeizedByThisApp(int chn, int appid);
/******************************************************************************
* 函数: PostEventToVoice(int voc, int evt)
* voc: 通道设备句柄
* evt: 事件代号
* 往通道设备上写事件
******************************************************************************/
extern "C" _declspec ( dllexport ) int PASCAL PostEventToVoice(int voc, int evt);
/******************************************************************************
* 函数: CreateShareLock(char * lockname)
*
* 说明:创建资源共享锁
*
******************************************************************************/
extern "C" _declspec ( dllexport ) HANDLE PASCAL CreateShareLock(char * lockname);
/******************************************************************************
* 函数: ReleaseLock(HANDLE hlock)
*
* hlock 由WaitLock得到资源锁句柄
* 说明: 释放一个资源琐
*
******************************************************************************/
extern "C" _declspec ( dllexport ) int PASCAL ReleaseLock(HANDLE hlock);
//extern "C" _declspec ( dllexport ) int PASCAL ReleaseLock(char * lockname);
/******************************************************************************
* 函数: WaitLock(char * lockname)
*
* sname 资源锁的名称
* 说明: 等待并抢占一个资源
* 返回: 资源锁句柄
******************************************************************************/
extern "C" _declspec ( dllexport ) HANDLE PASCAL WaitLock(char * lockname);
/*************************************************************************
* FUNC: int get_system_datetime(char * dt)
*
* 说明: 获取系统时间 "22:46:56"
*
*
************************************************************************/
extern "C" _declspec ( dllexport ) int PASCAL get_system_datetime(char * dt);
/************************************************************
* NAME: send_voice_chain(int cn, char *voice_chain, long win_msg)
* DESCRIPTION: 向语音受理程序返回语音解析链
* 参数 cn : 通道号 (1...MAXCHAN)
* voice_chain : 语音解析结果字符串
* win_msg : 语音受理接受到voice chain后向通道写的事件标志
************************************************************/
extern "C" _declspec ( dllexport ) int send_voice_chain(int cn, char *voice_chain, long win_msg);
/////////////////////////////////////////////////////////////////////////////
// CMyvcApp
// See myvc.cpp for the implementation of this class
//
class CMyvcApp : public CWinApp
{
public:
CMyvcApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyvcApp)
//}}AFX_VIRTUAL
//{{AFX_MSG(CMyvcApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYVC_H__012CCB86_D68E_11D4_8775_000103027259__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -