Hi everyone,
I need to call a DLL in C# from a VBA application. The DLL will expose a method that returns a complex class. I tested the interop and it worked fine when the method returns a primitive type, but when it returns a complex object, it does not work.
I precise I don't know anything at COM (I don't even understand how those GUIDs are generated!), I have Visual Studio .NET Express, what's the easiest method you would recommend to me?
Thanks in advance,
Mark
Loading

VulpesRank #55 · 29.2K reputationPosted Sep 7, 2012, 9:52 AM EDT
http://blogs.artinsoft.net/Mrojas/archive/2010/06/23/Exposing-C-Classes-thru-Interop.aspx
VulpesRank #55 · 29.2K reputationPosted Sep 6, 2012, 11:45 AM EDT
As far as exposing your own classes are concerned they must be public and, to be on the safe side, they should be decorated with the attribute [ComVisible(true)].
So I'd try that if you're not doing it already.
Mark Morrisson5 reputationPosted Sep 7, 2012, 4:05 AM EDT
Mark Morrisson5 reputationPosted Sep 7, 2012, 10:00 AM EDT
Mark