Easiest way to generate P/Invoke code?

前端 未结 2 653
南旧
南旧 2020-12-14 08:25

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 wh

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 09:08

    if the signatures of the functions are simple then it should take 10 minutes to setup - ie if they take 2 char * and return an int. Its only once they get complicated that it gets messy

    The bible on pinvoke is Adam Nathans - .NET and COM: The Complete Interoperability Guide

    And I agree with other poster - swig is not the right thing

提交回复
热议问题