I have a library(.lib) which as been implemented in VC++. I want to include or use this library in c# wpf project how can i achieve it.
Asked
Active
Viewed 1,578 times
1 Answers
2
You can use marshalling to access C++ code in your C# code.
Have a look at MSDN, too.
An example
[DllImport("example.dll")]
static public extern void DoSomething(int value);
and you can use your method in your C# code like usual
DoSomething(42);
Can be a bit confusing because you have to "map" the C++ types to C# and reverse.

Community
- 1
- 1

Mighty Badaboom
- 6,067
- 5
- 34
- 51