Home > Backend Development > Python Tutorial > Python 调用DLL操作抄表机

Python 调用DLL操作抄表机

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 11:26:57
Original
1385 people have browsed it

# -*- 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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template