Python calls a DLL to operate on a meter reader

  • 2020-04-02 09:24:45
  • OfStack

# -*- coding: GBK -*-
The from ctypes import *

DLL = windll. LoadLibrary (' JBA188. DLL)
A = DLL. The test ()
Print 'test device connection status %s '% a

SrcName = c_char_p (" publish_pd. Bin ")
DecName = c_char_p (' d: \ \ publish_pd. Bin)
B = DLL. Upfile (srcName decName)
Print 'upload the file to computer %s '% b

PStr = c_char_p ()
PStr. Value = ' '
C = DLL. Getdatetime (pStr);
Print 'read meter reader time %s '% c
Print the pSt

Related articles: