I have read quite a few different approaches on how to expose a .NET assembly to a COM application and I am trying to determine which is the best approach.
I have seen this approach:
vb.net Code:
<Microsoft.VisualBasic.ComClass(Foo.ClassId, Foo.InterfaceId, Foo.EventsId)> Public Class Foo Public Const ClassId As String = GUID Public Const InterfaceId As String = GUID Public Const EventsId As String = GUID
I have also read the approach that involves creating an interface as seen here. Although this method is way more involved as implementing all the members could take quite a bit of time.
What's the best practice here?


Reply With Quote