博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C#调用C++的库 P/Invoke工具集
阅读量:4493 次
发布时间:2019-06-08

本文共 1618 字,大约阅读时间需要 5 分钟。

p/Invoke可以使用工具辅助自动生成,以减少混淆

1、官方的支持

http://visualstudiogallery.msdn.microsoft.com/site/search?query=p%2Finvoke&f%5B0%5D.Value=p%2Finvoke&f%5B0%5D.Type=SearchText&ac=4

微软的官方扩展上也有很多

开源的工具

http://www.pin5i.com/showtopic-22763.html

看起来微软自己也是深受.NET蹩脚的P/Invoke支持的毒害,因此无奈之余发布了P/Invoke Interop Assistant工具,你可以去下面这个链接来下载这个工具:

实际上这个工具已经开源了,你可以从这里下载到它的源代码

2、经典的讨论区 

http://stackoverflow.com/questions/2495632/easiest-way-to-generate-p-invoke-code

  • PInvoker:
  • P/Invoke Interop Assistant:
  • P/Invoke Wizard:

http://www.paulyao.com/res/pinvoke/pinvoke.aspx

3、社区评论

http://through-the-interface.typepad.com/through_the_interface/2011/04/pinvoke-tools.html

 

The first tool is  from  (the UK-based provider of various development tools, including Reflector Pro). It appears to be a Visual Studio Add-in for VS2003 and 2005 (I can’t see an update for VS2008 or 2010, which also means I can’t try it). The tool provides simplified access to the excellent  website, to which I often refer when developing .NET apps. I don’t actually use that many P/Invoke statements that I feel I need an Add-In, though – which is perhaps why the add-in doesn’t appear to have been updated for more recent Visual Studio versions – but it seemed worth mentioning.

 

 

The second – in my opinion more interesting – tool is (here’s ,  and ). This tool generates P/Invoke signatures for use from C# and VB.NET, as well as the ability to determine the P/Invoke signatures used in compiled binaries:

 

    • Generating P/Invoke declarations while searching for commonly-used (presumably Win32) functions, structures, messages, etc.
       

转载于:https://www.cnblogs.com/code1992/p/11511642.html

你可能感兴趣的文章
Spring声明式事务配置
查看>>
并查集的实现
查看>>
Leetcode 350. Intersection of Two Arrays II
查看>>
EditPlus VC2010 and 2008 C/C++配置
查看>>
Practical Lessons from Predicting Clicks on Ads at Facebook
查看>>
JFrame面板
查看>>
Android自动化压力测试之Monkey Test 异常解读(五)
查看>>
Compressing Convolutional Neural Networks in the Frequency Domain 论文笔记
查看>>
设计模式:单例和多例
查看>>
Myslq 之修改数据库
查看>>
maven工程转为web工程时没有add web project capabilities选项的解决办法
查看>>
[BZOJ1192][HNOI2006]鬼谷子的钱袋
查看>>
Linux系统基础优化
查看>>
小程序开发快速入门教程(附源码)
查看>>
基于cropper.js的图片上传和裁剪
查看>>
车联网SaaS平台多租户平台技术选型参考
查看>>
我是如何快速积累工作经验
查看>>
用信号量进程同步与互斥
查看>>
随笔1
查看>>
Firebug入门指南
查看>>