Using c++ library in c#

后端 未结 5 1063
生来不讨喜
生来不讨喜 2020-11-27 21:40

I am trying include c++ library (DLL) in my c# project but every time I do that I get following error message in VS2008, any suggestions?

EDIT: It\'

5条回答
  •  野性不改
    2020-11-27 22:18

    If it's a clean C++ DLL where you only export C compatible functions, then you can use P/Invoke to use those functions. If you turn that C++ DLL into a COM DLL with a Type Library, using it is even easier: you can import the type library into .NET and .NET wrappers (called Runtime Callable Wrappers) are created for you.

提交回复
热议问题