Closed amrnegm closed 5 years ago
This python package requires the ZTK COM service under the Windows operating system. I wrote this code two years ago and I forgot details of this module. So I just could give you some advice. Maybe you could try to look into the dynamic library file by some tools and find the right function name and function parameter instead of just looking at the document. The document maybe too old for ZTK COM service now.
I registered libs on windows by copying them to C:\windows\system32
then running the 64bit_register_sdk bat file, and this error disappeared. It is now able to load zkemkeeper
lib. However, another error showed up Member not found
when your zk class try to instantiate an object from zkemkeeper.ZKEM
.
I used combrowse
dll browser from pywin32
to browse lib. I am not sure I understand the displayed structure, but it looks like it contains the methods demonstrated in documentation. If you can explain it to me, I can share a screenshot of the library structure generated from combrowse
. The blocking issue now is to have an instance from zkemkeeper.ZKEM
class, then use its internal methods.
I saw that you instantiate object from zkemkeeper.ZKEM.1
. What does this number mean?
Also, I have .Net code that uses the library but instantiates from zkemkeeper.CZKEM
class. The code is working. And it calls the same methods that you are calling when you instantiate from zkemkeeper.ZKEM.1
. Is there an explanation for the difference in class names used in each case? Unfortunately, I have no background is dealing with dlls or Microsoft development stack in general, that is why my questions may look naive.
I have made a try that seemed to work. I ran win32com.client.CastTo('zkemkeeper.ZKEM', 'IZKEM')
, it returned an object that I can call upon, for example, Connect_Net
that establishes a connection with machine.
The following error is raised when instantiating class zk.zk()
Steps to reproduce error:
from zk import zk
machine = zk('machine_ip', 'port', '', 'machine brand/model')