I have some functions in my VB.NET DLL which I can ‘hide’ from my VB6 app by using the following:
<Runtime.InteropServices.ComVisible(False)> _
But is there a way to make a function ONLY visible to COM clients and not to .NET assemblies?
This way I can use Shared methods for the .NET side avoiding the need for an instance declaration.
You might be able to achieve what you want by using Explicit Interface Implementation. You can declare an interface that will be used by COM clients and another one for .NET clients, leaving all methods private in your implementation class. The code may look like this:
I have to say that I do not understand what you mean with: “This way I can use Shared methods for the .NET side avoiding the need for an instance declaration. “