We help IT Professionals succeed at work.
Get Started

Developing VB6 components (DLLs) that can be recognized by other programming languages

BigBoss
BigBoss asked
on
292 Views
Last Modified: 2010-04-30
Hello,

I have been developing components (DLLs) in VB6 for some time now. The components are simple components that has only one or a few class modules. They do not have any object hierarchies or something like that. If a component has more than one class, each class is a stand-alone object and does not have any relation with the other class in the component.

 I used to write the code myself without using any tools like the VB Class Builder for example. I usually use the following to create properties, methods and events:

For properties, I use public variables like “Public MyProperty As String”
For methods, I use “Public Sub MyMethod(…) As …” or “Public Function MyMethod(…) As …”
For events, I use “Public Event(…)”

I know that for the properties I need to use the “Property Get …” and “Property Let…” thing, but I don’t really understand the actual difference between that and the method that I use (i.e. using public variables)!  

I have also read about interfaces but I have never used them (I think that in my case the use of interfaces is not really necessary!).

So, I would like to ask the following questions. Could someone please give me some in-depth answers and details?

1.      Can these components be used, and their properties, methods and events (and enums) be recognized by other programming languages like VC++, Delphi, etc. If not, what should I do to make their properties, methods and events (and enums) recognized by the other programming languages? Use interfaces maybe?

2.      If I use the VB Class Builder utility, does this utility create different definitions for the properties, methods and events (by automatically adding some “hidden” embedded code, interfaces, etc.) that will make the components usable and their members recognizable in other programming languages?

3.      What is the difference between using public variables for the properties and using the Get and Let?

4.      Do I really need to implement interfaces? Or are they not needed for my case?

Probably, I may ask a couple more related questions later on in this thread, or discuss your answers, so please expect some more discussion!

Thank you in advance.
Comment
Watch Question
This problem has been solved!
Unlock 2 Answers and 2 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE