Qt调用航天金卡读写器动态库
1、在项目pro文件中,添加以下内容
#航天金卡读写器 win32: LIBS += -L$$PWD/deviceapi/ -ICReader INCLUDEPATH += $$PWD/deviceapi DEPENDPATH += $$PWD/deviceapi
2、新建DevHtReader类
class DevHtReader { public: DevHtReader(); long m_nHnd; public: bool DevcOpen(QString &csErr,QString csCom,long nPort,QString &csRpy); bool DevcClos(QString &csErr,QString &csRpy); bool RestCard(QString &csErr,int nSlot,QString &csRpy); bool ClosCard(QString &csErr,int nSlot,QString &csRpy); bool TranChnl(QString &csErr,int nSlot,QString csCmd,QString &csRpy); bool RestPsam(QString &csErr,int nSlot,QString &csRpy); bool TranChnm(QString &csErr,int nSlot,QString csCmd,QString &csRpy); bool DoAudioC(int nTimes,int nVoice); bool DoLedDis(int nRed,int nBlue,int nYellow); };