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工具,你可以去下面这个链接来下载这个工具:
http://download.microsoft.com/download/f/2/7/f279e71e-efb0-4155-873d-5554a0608523/CLRInsideOut2008_01.exe

实际上这个工具已经开源了,你可以从这里http://www.codeplex.com/clrinterop/下载到它的源代码

2、经典的讨论区

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

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 the PInvoke Visual Studio Add-in from Red Gate Software (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 PInvoke.net 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 the P/Invoke Interop Assistant(here’s a more in-depth articlethe CodePlex hosting site and a Channel 9 interview with one of the authors).
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.pinvoke.net

最新文章

  1. java重载与覆写
  2. windows下的host文件在哪里?做什么用的?
  3. Win7系统修改hosts文件不能保存的解决方法
  4. CCNA网络工程师学习进程(6)vlan相关协议的配置与路由器简单配置介绍
  5. IE8下使用webuploader点击无反应的解决方法。
  6. SpringMVC配置入門
  7. struts2 集成 easyui
  8. NOI08冬令营 数据结构的提炼与压缩
  9. c#接口和抽象类比较
  10. Hadoop 少量map/reduce任务执行慢问题
  11. 1.在虚拟机中安装Linux中的CentOS7系统
  12. 常看本地是否安装Git和maven工具
  13. hugo小玩
  14. 【C#复习总结】垃圾回收机制(GC)1
  15. C语言实例:数组与字符串
  16. 关于Java Web应用中的配置部署描述符web.xml
  17. 洛谷.2709.小B的询问(莫队)
  18. kali的安装
  19. Js_封装JQ库为插件
  20. python 虚拟环境 pyenv

热门文章

  1. vim最常用命令
  2. Git生成公钥.pub 及秘钥 命令
  3. LNMP 架构安装部署
  4. RMQ 2d 模板
  5. Luogu P3170 [CQOI2015]标识设计 状态压缩,轮廓线,插头DP,动态规划
  6. 解决input 中placeholder的那些神坑
  7. git过期后,如何将新建的项目push到码云上而且下拉成功
  8. iOS中延迟执行和取消的几种方式
  9. 用class语法派生Enum并增加描述值的类属性来定义一个新枚举
  10. 树莓派Zero W无键盘无屏幕初始化