Import C ++ dll in C #

I created a C ++ dll (say MyC ++ Dll.dll) and I have a header file (MyC ++ Dll.h). MyC ++ Dll.h contains a type definition.

I want to import this DLL into the C # application that I am creating.

I can import dll using

[DllImport ("My ++ dll.dll")] static extern func ();

But I cannot import / include a header file (MyC ++ Dll.h) into a C # application that contains a type definition.

Please suggest a way to create this C # application successfully.

+3
source share
3 answers

(.. ..) # . http://pinvoke.net , Win32. , .

+5

, , - # , , DLL.

0

And you will also need to learn how to marshal types from C ++ to C #.

0
source

Source: https://habr.com/ru/post/1703419/


All Articles