python调用dll操作抄表机

# -*- coding: gbk -*- from ctypes import * dll = windll.loadlibrary(‘jba188.dll’) a = dll.test() print ‘测试设备连接状态%s’ % a srcname = c_char_p(“publish_pd.bin”) decname = c_char_p(‘d:\\publish_pd.bin’) b = dll.upfile(srcname,decname) print ‘将文件上传至计算机%s’ % b pstr = c_char_p() pstr.value = ” c = dll.getdatetime(pstr); print ‘读取抄表机时间%s’ % c print pst

Posted in 未分类

发表评论