使用Python访问我的.dll文件(Access my .dll file using Python)
IT问题网 2021-01-23 00:00:00
问 题
我目前正计划使用python访问基于mfc dialog的应用程序的.dll文件。我是python新手,安装了最新版本的python,即3.2。我也安装了pythonwin,但不确定它是否有用。我已经理解了在ctypes的帮助下使用python的基础知识。在我的dll文件中,我有两个函数:
double boxarea ( double l, double h, double w);
double boxvolume( double l, double h, double w);
我使用了extern dllimport命令在我的mfc对话框应用程序中访问这些。
extern " c" __ declspec ( dllexport ) void boxproperties( double 长度, double 高度,
double 宽度,双倍amp;面积,双倍和体积);
尝试使用其他mfc程序访问时,一切正常。现在,我试图使用python访问这两个函数。有人可以建议我怎么去,有什么命令会直接让我访问它?
非常感谢提前。
解决方案
谷歌揭示了所有。
python和mfc中的皮肤对话框 [ ^ ]
我自己没有使用过python,但是我的着名google技能产生了一些结果。
google搜索"python call dll" [ ^ ]并且阅读前几个点击似乎表明你需要的是ctypes。
15.17。 ctypes- 用于python的外部函数库 [ ^
分享: