我试着用windll.LoadLibrary在ctypes中,将dll文件导入python。虽然没有任何错误消息,但头文件中列出的函数似乎都没有成功加载。我想知道dll文件是否有问题,或者我使用了windll.LoadLibrary方法不正确。在
可以从以下链接下载dll和头文件: http://www.cc.ncu.edu.tw/~auda/ATC3DG.rar
我使用的python命令是:
from ctypes import *
libc=windll.LoadLibrary('ATC3DG.DLL')
可以从下面的链接查看结果,该链接显示dir(libc)没有给出ATC3DG.h中列出的任何函数或变量:
http://www.cc.ncu.edu.tw/~auda/ATC3DG.jpg
我在Windows7(64位)平台上使用Python2.7.3(32位)和iPython0.13.1。在
谢谢
张艾瑞克
当您使用
dir
时,它们不会出现,除非您已经访问过该函数。例如:您可以通过查看
^{pr2}$CDLL.__getitem__
和CDLL.__getattr__
方法来了解发生这种情况的原因:相关问题 更多 >
编程相关推荐