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
VulpesPosted Sep 7, 2012, 1:52 PM
http://blogs.artinsoft.net/Mrojas/archive/2010/06/23/Exposing-C-Classes-thru-Interop.aspx
Mark MorrissonPosted Sep 7, 2012, 2:00 PM
Mark
Mark MorrissonPosted Sep 7, 2012, 8:05 AM
VulpesPosted Sep 6, 2012, 3:45 PM
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.