开发者

How to use C functions from dll in .net(C#)?

If there's a dll written on C, then how is it possible to use it in .net(C#)?

Is it strictly necessary to write a header file for it in order to data types be compatible b开发者_Python百科etween two languages?


You already know about P/invoke from your previous question. Regarding the header file, it's not used for managed interop. Instead the P/invoke declarations specify the function parameters, calling conventions etc.


Yes, it's possible. It's called unmanaged DLL. There are quite a few tutorials in this regards. One of them i had from before when i was working in this similar aspect is: [1] http://www.codeproject.com/KB/mcpp/usingcppdll.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜