What would be a common strategy for using DLLs coded in native C++ in C#? I'm not really finding much good information about it, other than writing the DLL in C.
pseudorandom21
166
Practically a Posting Shark
Recommended Answers
Jump to PostAD is right, because of name-mangling in C++ (and ABI), you have to wrap all your C++ code into a C API (C functions). For example, say I wanted to "export" the following class from a DLL:
class Foo { private: double value; public: double GetValue() const …
All 4 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
pseudorandom21
166
Practically a Posting Shark
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.