Why we need to relate C# DLL to COM??
C# DLL Load to VC++
Why we cannot reference a DLL created in C# to VC++ Directly.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Nov 10, 2013, 7:21 PM
.NET DLLs don't normally use export tables but rely on metadata instead. All public methods or properties in a public class can be called by other .NET code.
It is possible for a .NET DLL to include an export table which enables C++ code to call static C# methods as long as their parameters use common types. However, this isn't supported from C# code and involves changing the MSIL directly, so it's a technique which is seldom used in practice.
Instead C++ and C# generally communicate via COM which provides a common binary interface and enables not just static methods but whole classes to be used between the two languages.