|
发表于 2015-5-19 11:02:04
|
显示全部楼层
- extern "C"
- {
- struct sOneCmd{
- UCHAR m_cID; //从站号
- UCHAR m_cCommand ; //命令类型
- UINT m_iAddr ; //short地址
- UINT m_iLenth ; //short长度
- void *m_pMemAddr ; //内存地址
- void *m_FunParam ; //回调函数参数
- long lFuncAddr ; //回调函数
- };
- struct sCycCmd :public sOneCmd
- {
- UINT m_lPriod ;
- UINT m_lTime ;
- };
- BOOL EXPORT __stdcall _InitComm2(UINT portnr);
- BOOL EXPORT __stdcall _InitComm(
- UINT portnr,
- UINT baud,
- TCHAR parity ,
- UINT databits,
- double stopsbits);
- void EXPORT __stdcall _UnInitComm(void);
- void EXPORT __stdcall _AddCommand(sOneCmd &OneCmd);
- INT EXPORT __stdcall _AddCycCommand(sCycCmd &CycCmd);
- int EXPORT __stdcall _RemoveCycCommand(sCycCmd &CycCmd);
- int EXPORT __stdcall _AddNotifyFunc(CallPROC lpEnumFunc,void *Param);
- };
复制代码 |
|