1

Interop.zkemkeeper.dll

function

error

No matter what I do,function 'BackupData' not found,help me,Thanks! code:

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from ctypes import *

zk = WinDLL('Interop.zkemkeeper.dll')
r = zk.BackupDat
print zk,r

result:

E:\Workspace\pycharm\door\Scripts\python.exe 
E:/Workspace/pycharm/door/mydoor/demo.py
Traceback (most recent call last):
 File "E:/Workspace/pycharm/door/mydoor/demo.py", line 6, in <module>
  r = zk.BackupDat
 File "c:\python27\Lib\ctypes\__init__.py", line 375, in __getattr__
  func = self.__getitem__(name)
 File "c:\python27\Lib\ctypes\__init__.py", line 380, in __getitem__
  func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'BackupDat' not found

Process finished with exit code 1
Mr.Tree
  • 11
  • 3
  • Please only post code and full traceback of error messages on SO, not pictures of it. Read also [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). – Mr. T Jan 30 '18 at 02:57
  • That's a *C#* based *.dll*. *ctypes* works with *C* based *.dll*s. Try opening it with [Dependency Walker](http://www.dependencywalker.com), and if you don't see `BackupDat` in the exported funcs list, you can't call it from *ctypes*. – CristiFati Jan 31 '18 at 13:37
  • Warning: At least one delay-load dependency module was not found. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module. – Mr.Tree Feb 01 '18 at 02:41
  • Those are just warnings. The fact that it can't find other *.dll*s (that it's depending on) has nothing to do with the exported symbols. Check [\[SO\]: C++ dll export undefined](https://stackoverflow.com/questions/47496315/c-dll-export-undefined/47551640#47551640), there's an image that shows the area (lower-right) where you should look. – CristiFati Feb 01 '18 at 17:02

0 Answers0