Easiest way to generate P/Invoke code?

Posted by Ope on Stack Overflow See other posts from Stack Overflow or by Ope
Published on 2010-03-22T20:50:37Z Indexed on 2010/03/22 20:51 UTC
Read the original article Hit count: 507

Filed under:
|
|

I am an experienced .Net programer, but have not compiled a C/C++ program in my life. Now I have this C-dll, headers and documentation (3rd party, not from Win API), from which I need to call about ten methods.

I was thinking of using Platform Invoke. I found these three tools that would create the code for me:

and possibly

Pinvoker seems to have a bit different approach than the Interop assistant and the Wizard. Swig I just found when checking that this question has not been asked here.

What are the pros and cons of these tools?

What would be the best = easiest and safest way for me to produce the P/Invoke code given that I don't know much about C/C++?

© Stack Overflow or respective owner

Related posts about pinvoke

Related posts about c#