quote:
Originally posted by felipEx
quote:
Originally posted by CookieRevised
quote:
Originally posted by felipEx
quote:
COM classes must have a parameterless Public Sub New() constructor, or the class will not register correctly
Source: Walkthrough: Creating COM Objects with Visual Basic .NET
That only applies for VB.NET (right?).
He is using C#...
It doesn't matter at all if it's C#/VB.NET, COM classes must have a parameterless constructor in order to register correctly. Sorry if I wasn't clear in the first place
ah yeah, but that's not what I meant. The code you showed for the parameterless constuctor (underlined bit) is VB.NET, not C#...
Also, in the C# code I showed, which is a working code apparently, they don't have that parameterless constructor, yet it does register perfectly according to the article though, so what are they doing differently?
Either way, also according to the code I showed, you best add a few more things to it in order to make it good COM Interop.