使用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的外部函数库 [ ^

标签:使用访问走访文件



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

从另一个Windows服务调用Windows服务(Call windows service from another windows service)

problem is it possible to call windows service from anoth ...

创建会计程序(creating accounting program)

problem hi all, can any one guide me how to creat acco ...

c sharp regex替换任何单词的第一个或最后一个字符(c sharp regex replace first or last character of any word)

problem want to remove first and last charact ...

用于检查字符串数组是否为空的代码(Code for checking whether string array is empty or not)

problem hi, please send me the code for checking whether ...

消息在try catch块中不起作用(Message is not working in try catch block)

problem showing a modal dialog box or form wh ...

循环如何从开始日期算起5天(How loop to count for 5 days from the start date)

problem hi i have a starting date, now i nee ...

如何绑定diffirent windows窗体中使用的相同用户控件组合框的两个数据源(how to bind two data sources for same user control combo box used in diffirent windows forms)

problem lt;pre lang="c#"gt;lt;/pregt; i want to bind two ...

是他们的任何querybuilder工具(Is Their any querybuilder tool)

problem i want to know that is dere any gui q ...

我希望从gridview获得一个链接来搜索报告页面(i want to have a link from a gridview that will search a report page)

problem can someone help me i want to search fromgridview ...

存储文本框值时无法获得正确的输出(not getting correct output when storing textbox values)

problem i keep getting the output in messagebox as ''0'' ...

如何在asp.net中调用客户端的服务器端功能?(How to call server side function in client side in asp.net)

problem how to call server side function in client side i ...

将Excel数据导入并更新到sql中(Import and Update Excel data into sql)

problem hi, am working on a project which import data int ...

如何在asp中使用我的sql(How to use my sql in asp)

problem hi sir/madam, in our application of asp,we have ...

如何制作wpf鼠标事件?(How can made wpf mouse event )

problem how can made wpf mouse event see more: c# please ...

如何在包含三个用于用户输入的asp.net服务器控件的表中动态添加行(how to add rows dynamically in the table containing three asp.net server controls for user input)

problem hi a table having 5 rows and 3 columns, each ro ...

如何将string []数组值分配给cookie(How to assign a string[] array values to a cookie)

problem i have a string array and it is filling by databa ...

在基本MSI项目中从InstallShield显示消息“安装程序需要64位处理器”(Show message “Setup requires a 64Bit processor” from InstallShield in basic MSI project)

problem i am using installshield 11 and creat ...

c ++编程语言(c++ programming language)

problem hello all, i am looking to design c++ code for is ...

MySql DB(如何在部署时添加DB)(MySql DB(how to add DB at the time of deployment))

problem hello, i am going to deploy(c#.net with mysql 5.0 ...

如何为15个链接按钮单击事件实现相同的代码(How to implement same code for 15 linkbutton click events)

problem hi, i want to bind a tree in horizon ...