I've been trying to create a dll file that can be registered and used by other applications using Visual Studio 2019 but to no avail. This is what I've done so far:
Create a Class Library:
<ComClass(MyClass.ClassId, MyClass.InterfaceId, MyClass.EventsId)>
Public NotInheritable Class MyClass
Public Const ClassId As String = "5C15AC97-E0DD-4D3B-A5F4-834360A1EB31"
Public Const InterfaceId As String = "70C153A6-2576-4C6A-91FB-1AC07D7985CE"
Public Const EventsId As String = "1030DA19-642D-42D0-877C-29BBBF5FC45C"
... rest of class definition with a constructor
In the properties: Application -> Assembly Information, I checked the option "Make assembly COM-visible" Compile, I checked the "Register for COM interop" option
I have 1 error and 1 warning: Error: Cannot register type library \MyClass.tlb. Error accessing the OLE registry (is it because I don't have admin rights on my machine?) Warning: \MyClass.dll does not contain any types that can be registered for COM Interop.
What I'd like to do is build my solution, retrieve the dll file, store it on another computer where I have admin rights and register it so that I can use my object in another application, just like I used to do back in the VB6 days. If I try to register the dll file that is generated, I get a "entry-point not found" message.
What am I missing to achieve what I want?
Thanks