shiping wang

Hi, friends:

I'm trying C# program. I wish to load my orginal C++ dll or lib. How I can link these lib/dll within Visual studio

Thanks!

WSP




Re: Visual C++ General C# program link C++ lib/dll

crescens2k

If your C++ code is native then you will need to use mixed mode C++ or Platform Invoke to get access to them. If you are using Managed C++ then you can just reference it like any normal CLR assembly.

A note though, if it is a static library then you will need to create a dynamic library out of it.






Re: Visual C++ General C# program link C++ lib/dll

shiping wang

Thank you!

How do use mixed mode C++ or Platform Invoke to get access to them.

I use ["xxx.dll"] in C# program. It cannot compile.

Best Regards!

Shiping