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.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Nov 10, 2013, 2:21 PM EST
.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.