I created a .NET dll. I want to try to use it with vb6. I did some research on how to do this, but I want to make sure I'm doing it the ideal way so it will work properly.
A bit of background on the DLL. I have one class that I want to expose. All the properties that I want to expose are declared public. That class references a few underlying classes, which are all declared as "Friend" and are marked as ComVisible. I have "Register for COM Interop" marked in the compile flags. I also have "Make Assembly COM-Visible" marked in the assembly information.
I used regasm to register the DLL, which created a .tlb file. In vb6, i tried to reference the .dll but it said cannot add reference. I reference the tlb file and i was able to declare it and use it. I just did a declaration, and did a simple form load which called one of my properties .Name. I know the properties referenced ok because I ran it with no problem. If I changed it to .NAM it failed, which is what I expected. However, none of my properties should up in intellitype. Only the enums.
Is this correct what I am doing? I'm not very familiar with this type of thing. Is there a way for the properties to show in intellitype?
A bit of background on the DLL. I have one class that I want to expose. All the properties that I want to expose are declared public. That class references a few underlying classes, which are all declared as "Friend" and are marked as ComVisible. I have "Register for COM Interop" marked in the compile flags. I also have "Make Assembly COM-Visible" marked in the assembly information.
I used regasm to register the DLL, which created a .tlb file. In vb6, i tried to reference the .dll but it said cannot add reference. I reference the tlb file and i was able to declare it and use it. I just did a declaration, and did a simple form load which called one of my properties .Name. I know the properties referenced ok because I ran it with no problem. If I changed it to .NAM it failed, which is what I expected. However, none of my properties should up in intellitype. Only the enums.
Is this correct what I am doing? I'm not very familiar with this type of thing. Is there a way for the properties to show in intellitype?
Comment