P / Call purely C ++ library?

Is it possible to call P / a clean C ++ library, or does it need to be wrapped in C?

+5
source share
2 answers

C ++ libraries can be called by P /, but you will need to use the "depends" on finding the method names you are looking for (names like "@ 0! Classname @classname @zz"), and for example, methods use the "ThisCall" call convention in p / invoke and pass the instance reference as the first argument (you can save the result of the constructor inside IntPtr).

+2
source

"" ++ , , P/Invoke. C , ++. ++- , , .

, ++ API C- .

+1

All Articles