当前位置:编程学习 > C#/ASP.NET >>

求教关于调用非托管DLL的问题

现在碰到一个非托管的DLL,里面的API需不需要全部用到暂时不清楚。

但是可能有百来个API在那里。难道要一个个DllImport吗?有没有什么简单的方法

新手在这里求指导 dll --------------------编程问答-------------------- "难道要一个个DllImport吗?"

是的 --------------------编程问答--------------------
引用 1 楼 Lost_Painting 的回复:
"难道要一个个DllImport吗?"

是的


--------------------编程问答-------------------- --------------------编程问答-------------------- 不知道有没有什么工具能自动生成DllImport --------------------编程问答-------------------- 看看这个好使不:
Managed, Native, and COM Interop Team
http://clrinterop.codeplex.com/


Project Description: P/Invoke Interop Assistant
In marshalling there are many attributes and rules for dealing with types. Understanding all of these can be a bit daunting. To improve the development experience, the P/Invoke Interop Assistant was created. It is a tool that conveniently converts C/C++ to managed P/Invoke signatures or verse visa. It even comes with a database of Win32 functions, data types, and constants, so the common task of adding a Win32 P/Invoke to your C# or Visual Basic source file is made very easy. There is a great marshalling article on MSDN Magazine website --------------------编程问答-------------------- --------------------编程问答--------------------
引用 4 楼 test2050 的回复:
不知道有没有什么工具能自动生成DllImport

自己写个小程序呗来实现该功能 --------------------编程问答--------------------
引用 5 楼 findcaiyzh 的回复:
看看这个好使不:
Managed, Native, and COM Interop Team
http://clrinterop.codeplex.com/


Project Description: P/Invoke Interop Assistant
In marshalling there are many attributes and rules f……


下了用用,虽然没怎么明白这玩意想干嘛

但是我想的事情它都没完成 --------------------编程问答-------------------- 他幫你完成了很多事.. 你没有去了解而已

http://clrinterop.codeplex.com/releases/view/14120

引用 8 楼 sd197994ni 的回复:
引用 5 楼 findcaiyzh 的回复:看看这个好使不:
Managed, Native, and COM Interop Team
http://clrinterop.codeplex.com/


Project Description: P/Invoke Interop Assistant
In marshalling there are many ……
--------------------编程问答--------------------
引用 9 楼 Lost_Painting 的回复:
他幫你完成了很多事.. 你没有去了解而已

http://clrinterop.codeplex.com/releases/view/14120

引用 8 楼 sd197994ni 的回复:引用 5 楼 findcaiyzh 的回复:看看这个好使不:
Managed, Native, and COM Interop Team
http://clrintero……


除了一个search模块我能用。。。
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,