How to set up a C++ function so that it can be used by p/invoke?

前端 未结 6 672
旧巷少年郎
旧巷少年郎 2020-12-30 13:01

Hopefully this is a brainlessly easy question, but it shows my lack of expertise with C++. I\'m a C# programmer, and I\'ve done extensive work with P/Invoke in the past wit

6条回答
  •  猫巷女王i
    2020-12-30 13:40

    You have to expose this function with extern "C" otherwise the name gets mangled.

提交回复
热议问题